Skip to content

refactor(#265): prefer dedicated tools over bash for file operations - #309

Merged
admarble merged 3 commits into
mainfrom
feature/265-audit-skill-prompts-prefer-dedicated-tools-over-ba
Feb 20, 2026
Merged

admarble merged 3 commits into
mainfrom
feature/265-audit-skill-prompts-prefer-dedicated-tools-over-ba

Conversation

@admarble

Copy link
Copy Markdown
Contributor

Summary

  • Update skill prompts in .claude/skills/ and templates/skills/ to prefer dedicated tools (Read, Edit, Glob, Grep, Write) over bash equivalents for file operations
  • Align with Claude Code v2.1.31 guidance for improved security and efficiency
  • Both directories updated independently (no sync:skills)

Changes

Files Updated:

  • .claude/skills/improve/SKILL.md - Detection strategies now use Grep/Glob tools
  • .claude/skills/release/SKILL.md - Version updates now use Edit tool instead of sed
  • .claude/skills/security-review/references/security-checklists.md - Security checks now use Grep tool
  • templates/skills/improve/SKILL.md - Same changes as .claude/skills version
  • templates/skills/security-review/references/security-checklists.md - Same changes as .claude/skills version

Patterns Changed:

Before After
grep -r "pattern" path/ Grep(pattern="pattern", path="path/")
find src -name "*.ts" Glob(pattern="src/**/*.ts")
sed -i '' "s/old/new/g" file Edit(file_path="file", old_string="old", new_string="new", replace_all=true)

Patterns NOT Changed (appropriate bash usage):

  • grep on CLI output (git, gh, echo) - text processing, not file ops
  • head/tail on command output - output truncation
  • cat <<'EOF' heredocs for gh comments - inline strings
  • npm/git commands - actual system operations

Test plan

  • All skill files in .claude/skills/ audited
  • All template files in templates/skills/ audited
  • Both locations updated independently (no sync:skills)
  • Changes preserve existing skill behavior — only tool choice changes
  • npm run build passes
  • npm run lint passes
  • npm test passes (excluding pre-existing flaky integration tests)

Closes #265

🤖 Generated with Claude Code

- Update .claude/skills/improve/SKILL.md: replace grep/find bash examples with
  Grep/Glob tool recommendations for file content search and discovery
- Update .claude/skills/release/SKILL.md: replace sed -i file editing with
  Edit tool recommendation for version updates
- Update .claude/skills/security-review/references/security-checklists.md:
  replace all grep -r file searches with Grep tool examples
- Apply identical changes to templates/skills/ (independent updates, no sync)

This aligns skill prompts with Claude Code v2.1.31 guidance to prefer dedicated
tools (Read, Edit, Glob, Grep, Write) over bash equivalents for file operations.

Patterns NOT changed (appropriate bash usage):
- grep on CLI output (git, gh, echo) - text processing, not file ops
- head/tail on command output - output truncation
- cat <<'EOF' heredocs for gh comments - inline strings
- npm/git commands - actual system operations

Closes #265
…d tools

Address QA gaps: grep -r, find, sed file ops in assess, exec, qa
skills and references. Mirrors applied to templates/ independently.

Remaining bash patterns are valid exclusions:
- sed/grep on piped git/gh CLI output (text processing)
- .sh scripts (excluded per issue scope)
Address remaining gaps: cat .sequant/settings.json | jq patterns in
merger, qa, spec, fullsolve, solve skills. cat /tmp/... in loop skill.
All converted to Read(file_path=...) pseudo-code.

Mirrors applied to templates/ independently (loop, solve, spec).
No templates/skills/merger/ exists — no mirror needed.
@admarble
admarble merged commit 24767fc into main Feb 20, 2026
6 checks passed
@admarble
admarble deleted the feature/265-audit-skill-prompts-prefer-dedicated-tools-over-ba branch February 20, 2026 23:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Audit skill prompts: prefer dedicated tools over bash for file operations

1 participant