You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-`SKILL.md` uses YAML front matter and requires `name` and `description`. citeturn3view3turn3view4
49
49
- Required fields are single-line with length limits (name ≤ 100 chars, description ≤ 500 chars). citeturn3view4
50
50
- At startup, Codex loads only each skill’s name/description; full content is injected when invoked. citeturn3view3turn3view4
51
-
- Skills can be repo-scoped in `.codex/skills/` or user-scoped in `~/.codex/skills/`. citeturn3view4
51
+
- Skills can be repo-scoped in `.agents/skills/` and are discovered from the current working directory up to the repository root. User-scoped skills live in `~/.agents/skills/`. citeturn1view1turn1view4
52
+
- Inference: some existing tooling and user setups still use `.codex/skills/` and `~/.codex/skills/` as legacy compatibility paths, but those locations are not documented in the current OpenAI Codex skills docs linked above.
53
+
- Codex also supports admin-scoped skills in `/etc/codex/skills` plus built-in system skills bundled with Codex. citeturn1view4
52
54
- Skills can be invoked explicitly using `/skills` or `$skill-name`. citeturn3view3
Copy file name to clipboardExpand all lines: plugins/compound-engineering/AGENTS.md
+12Lines changed: 12 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -93,6 +93,18 @@ This plugin is authored once, then converted for other agent platforms. Commands
93
93
-[ ] When one skill refers to another skill, prefer semantic wording such as "load the `document-review` skill" rather than slash syntax.
94
94
-[ ] Use slash syntax only when referring to an actual published command or workflow such as `/ce:work` or `/deepen-plan`.
95
95
96
+
### Tool Selection in Agents and Skills
97
+
98
+
Agents and skills that explore codebases must prefer native tools over shell commands.
99
+
100
+
Why: shell-heavy exploration causes avoidable permission prompts in sub-agent workflows; native file-search, content-search, and file-read tools avoid that.
101
+
102
+
-[ ] Never instruct agents to use `find`, `ls`, `cat`, `head`, `tail`, `grep`, `rg`, `wc`, or `tree` through a shell for routine file discovery, content search, or file reading
103
+
-[ ] Describe tools by capability class with platform hints — e.g., "Use the native file-search/glob tool (e.g., Glob in Claude Code)" — not by Claude Code-specific tool names alone
104
+
-[ ] When shell is the only option (e.g., `ast-grep`, `bundle show`, git commands), instruct one simple command at a time — no chaining (`&&`, `||`, `;`), pipes, or redirects
105
+
-[ ] Do not encode shell recipes for routine exploration when native tools can do the job; encode intent and preferred tool classes instead
106
+
-[ ] For shell-only workflows (e.g., `gh`, `git`, `bundle show`, project CLIs), explicit command examples are acceptable when they are simple, task-scoped, and not chained together
Copy file name to clipboardExpand all lines: plugins/compound-engineering/agents/research/best-practices-researcher.md
+8-3Lines changed: 8 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,9 +30,12 @@ You are an expert technology researcher specializing in discovering, analyzing,
30
30
Before going online, check if curated knowledge already exists in skills:
31
31
32
32
1.**Discover Available Skills**:
33
-
- Use Glob to find all SKILL.md files: `**/**/SKILL.md` and `~/.claude/skills/**/SKILL.md`
34
-
- Also check project-level skills: `.claude/skills/**/SKILL.md`
35
-
- Read the skill descriptions to understand what each covers
33
+
- Use the platform's native file-search/glob capability to find `SKILL.md` files in the active skill locations
34
+
- For maximum compatibility, check project/workspace skill directories in `.claude/skills/**/SKILL.md`, `.codex/skills/**/SKILL.md`, and `.agents/skills/**/SKILL.md`
35
+
- Also check user/home skill directories in `~/.claude/skills/**/SKILL.md`, `~/.codex/skills/**/SKILL.md`, and `~/.agents/skills/**/SKILL.md`
36
+
- In Codex environments, `.agents/skills/` may be discovered from the current working directory upward to the repository root, not only from a single fixed repo root location
37
+
- If the current environment provides an `AGENTS.md` skill inventory (as Codex often does), use that list as the initial discovery index, then open only the relevant `SKILL.md` files
38
+
- Use the platform's native file-read capability to examine skill descriptions and understand what each covers
36
39
37
40
2.**Identify Relevant Skills**:
38
41
Match the research topic to available skills. Common mappings:
@@ -123,4 +126,6 @@ Always cite your sources and indicate the authority level:
123
126
124
127
If you encounter conflicting advice, present the different viewpoints and explain the trade-offs.
125
128
129
+
**Tool Selection:** Use native file-search/glob (e.g., `Glob`), content-search (e.g., `Grep`), and file-read (e.g., `Read`) tools for repository exploration. Only use shell for commands with no native equivalent (e.g., `bundle show`), one command at a time.
130
+
126
131
Your research should be thorough but focused on practical application. The goal is to help users implement best practices confidently, not to overwhelm them with every possible approach.
Copy file name to clipboardExpand all lines: plugins/compound-engineering/agents/research/framework-docs-researcher.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -103,4 +103,6 @@ Structure your findings as:
103
103
6.**Common Issues**: Known problems and their solutions
104
104
7.**References**: Links to documentation, GitHub issues, and source files
105
105
106
+
**Tool Selection:** Use native file-search/glob (e.g., `Glob`), content-search (e.g., `Grep`), and file-read (e.g., `Read`) tools for repository exploration. Only use shell for commands with no native equivalent (e.g., `bundle show`), one command at a time.
107
+
106
108
Remember: You are the bridge between complex documentation and practical implementation. Your goal is to provide developers with exactly what they need to implement features correctly and efficiently, following established best practices for their specific framework versions.
Copy file name to clipboardExpand all lines: plugins/compound-engineering/agents/research/git-history-analyzer.md
+7-5Lines changed: 7 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,17 +23,19 @@ assistant: "Let me use the git-history-analyzer agent to investigate the histori
23
23
24
24
You are a Git History Analyzer, an expert in archaeological analysis of code repositories. Your specialty is uncovering the hidden stories within git history, tracing code evolution, and identifying patterns that inform current development decisions.
25
25
26
+
**Tool Selection:** Use native file-search/glob (e.g., `Glob`), content-search (e.g., `Grep`), and file-read (e.g., `Read`) tools for all non-git exploration. Use shell only for git commands, one command per call.
27
+
26
28
Your core responsibilities:
27
29
28
-
1.**File Evolution Analysis**: For each file of interest, execute `git log --follow --oneline -20` to trace its recent history. Identify major refactorings, renames, and significant changes.
30
+
1.**File Evolution Analysis**: Run `git log --follow --oneline -20 <file>` to trace recent history. Identify major refactorings, renames, and significant changes.
29
31
30
-
2.**Code Origin Tracing**: Use`git blame -w -C -C -C` to trace the origins of specific code sections, ignoring whitespace changes and following code movement across files.
32
+
2.**Code Origin Tracing**: Run`git blame -w -C -C -C <file>` to trace the origins of specific code sections, ignoring whitespace changes and following code movement across files.
31
33
32
-
3.**Pattern Recognition**: Analyze commit messages using `git log --grep` to identify recurring themes, issue patterns, and development practices. Look for keywords like 'fix', 'bug', 'refactor', 'performance', etc.
34
+
3.**Pattern Recognition**: Run `git log --grep=<keyword> --oneline` to identify recurring themes, issue patterns, and development practices.
33
35
34
-
4.**Contributor Mapping**: Execute`git shortlog -sn --` to identify key contributors and their relative involvement. Cross-reference with specific file changes to map expertise domains.
36
+
4.**Contributor Mapping**: Run`git shortlog -sn -- <path>` to identify key contributors and their relative involvement.
35
37
36
-
5.**Historical Pattern Extraction**: Use`git log -S"pattern" --oneline` to find when specific code patterns were introduced or removed, understanding the context of their implementation.
38
+
5.**Historical Pattern Extraction**: Run`git log -S"pattern" --oneline` to find when specific code patterns were introduced or removed.
37
39
38
40
Your analysis methodology:
39
41
- Start with a broad view of file history before diving into specifics
Copy file name to clipboardExpand all lines: plugins/compound-engineering/agents/research/repo-research-analyst.md
+5-10Lines changed: 5 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -56,8 +56,10 @@ You are an expert repository research analyst specializing in understanding code
56
56
- Analyze template structure and required fields
57
57
58
58
5.**Codebase Pattern Search**
59
-
- Use `ast-grep` for syntax-aware pattern matching when available
60
-
- Fall back to `rg` for text-based searches when appropriate
59
+
- Use the native content-search tool for text and regex pattern searches
60
+
- Use the native file-search/glob tool to discover files by name or extension
61
+
- Use the native file-read tool to examine file contents
62
+
- Use `ast-grep` via shell when syntax-aware pattern matching is needed
61
63
- Identify common implementation patterns
62
64
- Document naming conventions and code organization
63
65
@@ -115,14 +117,7 @@ Structure your findings as:
115
117
- Flag any contradictions or outdated information
116
118
- Provide specific file paths and examples to support findings
117
119
118
-
**Search Strategies:**
119
-
120
-
Use the built-in tools for efficient searching:
121
-
-**Grep tool**: For text/code pattern searches with regex support (uses ripgrep under the hood)
122
-
-**Glob tool**: For file discovery by pattern (e.g., `**/*.md`, `**/CLAUDE.md`)
123
-
-**Read tool**: For reading file contents once located
124
-
- For AST-based code patterns: `ast-grep --lang ruby -p 'pattern'` or `ast-grep --lang typescript -p 'pattern'`
125
-
- Check multiple variations of common file names
120
+
**Tool Selection:** Use native file-search/glob (e.g., `Glob`), content-search (e.g., `Grep`), and file-read (e.g., `Read`) tools for repository exploration. Only use shell for commands with no native equivalent (e.g., `ast-grep`), one command at a time.
0 commit comments