Public repository for reusable AI-agent skills, supporting both Codex and Claude Code.
Current release: 0.11.0
source-analyzer ships a built-in search CLI (brief, search --snippet-only) that was A/B tested against raw file reads with identical questions across sub-agents:
| Metric | v0.10 (full text) | v0.11 (brief + snippet) | Raw file reads |
|---|---|---|---|
| Tokens | 36,110 | 26,251 | 26,600 |
| Tool calls | 11 | 9 | 10 |
| Duration | 46s | 42s | 49s |
The brief + search --snippet-only --snippet-len 600 pattern matches raw file efficiency on small projects and scales better on large codebases — the agent reads only what it needs instead of full documents.
- Supports both Codex runtime skills and a Claude Code plugin marketplace.
- Codex skills use a flat runtime layout: one
SKILL.md, oneagents/openai.yaml, and optionalshared/. - Claude Code skills are distributed through the
code-workflowplugin with bilingualSKILL.mdfiles and sharedreferences/. source-analyzerproduces resumable.analysis/outputs and ships a wiki publisher alongside its checkpoint manager.source-analyzerprovides built-in CLI search commands for querying analysis outputs and checkpoints.- A local MCP server is also available for agents that support MCP-based tool discovery.
- A local authoring wrapper lives at
.codex/skills/skill-generator. - Public Codex skill roots:
codex/skills/source-analyzercodex/skills/implementcodex/skills/plan-for-codexcodex/skills/refactorcodex/skills/reviewcodex/skills/github-flow
codex/
skills/
source-analyzer/ # BFS codebase analysis (3 modes)
implement/ # Work order execution
plan-for-codex/ # Request → work orders
refactor/ # Behavior-preserving refactoring
review/ # Diff-based code review
github-flow/ # Full GitHub Flow lifecycle
claude-code/
plugin/
.claude-plugin/
plugin.json # code-workflow plugin manifest
.mcp.json # MCP server config (optional)
skills/ # 6 Claude Code skills
references/ # 14 shared reference templates
scripts/ # checkpoint_manager.py (canonical), search, wiki
servers/ # MCP server bundle (synced copy)
.agents/
plugins/
marketplace.json # Codex local marketplace
.claude-plugin/
marketplace.json # Claude Code marketplace
plugins/
source-analyzer-tools/ # Codex MCP plugin bundle
servers/
source-analyzer-mcp/ # Canonical MCP server sources
.codex/
skills/
skill-generator/ # Skill authoring wrapper
scripts/
install_codex_skill.sh # Codex skill installer
sync_source_analyzer_mcp.sh # Sync canonical sources to all bundles
tests/ # 6 test suites
codex/skills/<skill-name> stores the Codex source layout with flat runtime files only.
claude-code/plugin/ is the Claude Code plugin distribution with shared references and shared scripts.
- Analyzes an existing codebase without modifying source files.
- Produces resumable outputs under
.analysis/sessions/and published outputs under.analysis/outputs/. - Supports
analyze,refactor-guide, andoverhaulmodes. - Ships
checkpoint_manager.pyandpublish_wiki.shin both Codex and Claude Code distributions. - Provides CLI search commands:
search,get-overview,get-module,trace-deps,get-issues. - Also ships a local MCP server under
servers/source-analyzer-mcp/for MCP-capable agents.
- Executes an approved work order directly.
- Keeps the scope small, explicit, and verification-driven.
- Splits a request into executable work orders for Codex.
- Keeps tasks bounded, verifiable, and ready for
/implement.
- Performs safe, behavior-preserving refactoring.
- Integrates with
source-analyzerviaissue-candidates.mdfor analysis-driven refactoring. - Uses shared checklists and refactoring patterns.
- Performs diff-based review focused on regressions, security issues, and missing tests.
- Produces a fix work order when changes are required.
- Guides through the full GitHub Flow lifecycle: branch → develop → PR → merge → release.
- Phase 2 integrates
plan→implement→reviewas an inner loop before each commit. - Available for both Codex (
/github-flow) and Claude Code (/code-workflow:github-flow).
- Lives under
.codex/skills/skill-generator. - Wraps the upstream
skill-creatorworkflow for this repository. - Enforces the flat
SKILL.md+agents/openai.yaml+ optionalshared/convention used by public Codex skills.
Clone this repository, then install one or more skills into your local Codex home.
scripts/install_codex_skill.sh --list
scripts/install_codex_skill.sh source-analyzer
scripts/install_codex_skill.sh source-analyzer --with-mcp
scripts/install_codex_skill.sh implement
scripts/install_codex_skill.sh --allBy default the installer copies skills into ${CODEX_HOME:-$HOME/.codex}/skills.
Each skill is a single SKILL.md that responds in the user's language automatically.
For source-analyzer, --with-mcp also registers source-analyzer-search via codex mcp add ....
scripts/install_codex_skill.sh source-analyzer --with-mcp
codex mcp list
python3 ~/.codex/skills/source-analyzer/shared/scripts/checkpoint_manager.py generate-search-indexAfter registration, Codex should list source-analyzer-search in codex mcp list.
Once .analysis/outputs/ and .analysis/cache/source-analyzer-search/ exist, the agent can call:
analysis.searchfor natural-language retrieval across overview, architecture, module docs, issues, and checkpointsanalysis.get_modulefor a direct module doc or module-map lookupanalysis.trace_dependenciesfor dependency expansion from a file path
The repo also includes a Codex plugin bundle artifact:
.agents/plugins/marketplace.jsonplugins/source-analyzer-tools/
Canonical MCP sources live under servers/source-analyzer-mcp/.
Use scripts/sync_source_analyzer_mcp.sh when bundle copies need to be refreshed.
This repository is also a Claude Code plugin marketplace. Add it directly and install the code-workflow plugin:
# Add this repo as a marketplace
/plugin marketplace add devlikebear/ai-skills
# Install the plugin
/plugin install code-workflow@ai-skillsAfter installation the following skills are available:
/code-workflow:plan/code-workflow:implement/code-workflow:review/code-workflow:refactor/code-workflow:source-analyzer/code-workflow:github-flow
Plugin skills are bilingual and detect the user's language automatically.
The plugin also bundles source-analyzer-search through claude-code/plugin/.mcp.json.
- Run
/code-workflow:source-analyzerand let it publish.analysis/outputs/. - The search index is generated automatically on publish. To rebuild manually:
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/checkpoint_manager.py" generate-search-index - Use the built-in CLI search commands or the MCP tools to query the analysis.
checkpoint_manager.py provides CLI subcommands for querying analysis outputs without requiring an MCP server:
CHECKPOINT_SCRIPT="path/to/checkpoint_manager.py"
# Keyword search across all analysis outputs
python3 "$CHECKPOINT_SCRIPT" search "auth middleware" --top-k 5
# Get the published overview document
python3 "$CHECKPOINT_SCRIPT" get-overview
# Get a specific module document by name
python3 "$CHECKPOINT_SCRIPT" get-module auth
# Trace dependency chain for a file
python3 "$CHECKPOINT_SCRIPT" trace-deps src/auth.py --depth 3
# List issue candidates (optionally filter by type)
python3 "$CHECKPOINT_SCRIPT" get-issues --type SECsource-analyzer auto-generates the search cache when outputs are published on paused or completed checkpoints.
If you already finished analysis earlier, you can still generate or rebuild the index manually:
python3 codex/skills/source-analyzer/shared/scripts/checkpoint_manager.py generate-search-indexIf the cache is missing, the MCP server can still fall back to direct scanning of .analysis/outputs/.
For this repository itself, use the root helper:
scripts/publish_wiki.sh --session-id analyze-20260308-120027
scripts/publish_wiki.sh --dry-runWhen source-analyzer is installed as a runtime skill, the distributed wiki publishers live at:
codex/skills/source-analyzer/shared/scripts/publish_wiki.shclaude-code/plugin/scripts/publish_wiki.sh
Those distributed scripts support --project-dir <path> so they can publish analysis outputs from another checked-out project.
Shared scripts must stay identical across distributions. The canonical sources and their sync targets:
| Canonical Source | Sync Targets |
|---|---|
claude-code/plugin/scripts/checkpoint_manager.py |
codex/.../shared/scripts/checkpoint_manager.py |
servers/source-analyzer-mcp/source_analyzer_search.py |
5 locations (see sync script) |
servers/source-analyzer-mcp/server.py |
3 locations (see sync script) |
Run the sync script after modifying any canonical source:
scripts/sync_source_analyzer_mcp.shContract tests in tests/test_skill_repository_contract.py verify all copies stay in sync.
<skill-name>/
SKILL.md
agents/
openai.yaml
shared/
scripts/
references/
<skill-name>/
SKILL.md
Shared references live in claude-code/plugin/references/ and are referenced by all plugin skills.
Use .codex/skills/skill-generator when you want to generate a new Codex skill that follows the repository convention.
- Codex discovers runtime skills from
~/.codex/skills. - Codex MCP servers can be registered directly with
codex mcp add .... - Claude Code installs skills via plugin marketplace.
.analysis/outputs/contains publishable, git-trackable analysis outputs..analysis/cache/source-analyzer-search/contains local search indexes (git-ignored)..analysis/sessions/contains transient working state (git-ignored).- Release history is tracked in
CHANGELOG.md. - Licensing is provided in
LICENSE.