Agent skill
observe-before-editing
Observe Before Editing
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/skills/other/observe-before-editing
SKILL.md
Observe Before Editing
Before editing code to fix a bug, confirm what the system actually produced.
Pattern
Outputs don't lie. Code might. Check outputs first.
DO
- Check if expected directories exist:
ls -la .claude/cache/ - Check if expected files were created:
ls -la .claude/cache/learnings/ - Check logs for errors:
tail .claude/cache/*.log - Run the failing command manually to see actual error
- Only then edit code
DON'T
- Assume "hook didn't run" without checking outputs
- Edit code based on what you think should happen
- Confuse global vs project paths (check both:
.claude/and~/.claude/)
Source Sessions
- a541f08a: Token limit error was invisible until manual run revealed it
- 6a9f2d7a: Looked in wrong cache path (
~/.claude/vs.claude/), assumed hook failure - a8bd5cea: Confirmed hook worked by finding output files in project cache
- 1c21e6c8: Verified Artifact Index indexing by checking DB file exists
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?