agentleFS
anam-organam-org/metaxy/.claude/skills/claude-improve-config/SKILL.md

claude-improve-config

Skill126 starsChanged 9 months agoApache-2.0View on GitHub

Self-reflect on the current session to identify mistakes and propose improvements to .claude configuration (CLAUDE.md, hooks, skills).

The file

We split this skill into the rules it gives an agent

12 rules. About 0 are common, 11 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈11

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    After a session with significant mistakes or rework

    line 12
  2. Distinctive:

    When you notice patterns that could be prevented with better configuration

    line 13
  3. Very specific:

    When explicitly requested via /claude-improve-config

    line 14
  4. Distinctive:

    Only propose changes for critical or moderate issues.

    line 38
  5. Distinctive:

    Stop hooks to enforce checks before completion

    line 54
  6. Distinctive:

    Only propose changes that are generalizable - don't add rules for one-off situations

    line 89
  7. Distinctive:

    Keep CLAUDE.md concise - prefer hooks for enforcement over verbose instructions

    line 90
  8. Distinctive:

    Test proposed hooks mentally - ensure they won't block legitimate workflows

    line 91
  9. Distinctive:

    Prefer minimal changes - one well-designed rule is better than many narrow ones

    line 92
  10. Distinctive:

    Consider false positives - hooks should not create friction for normal operations

    line 93
  11. Distinctive:

    Proposal: Add to CLAUDE.md:

    line 101
  12. Distinctive:

    Proposal: Add PostToolUse hook for Write/Edit:

    line 111

≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Claude Config Self-Improvement

Analyze the current session for errors, mistakes, or inefficiencies and propose improvements to the .claude configuration to prevent similar issues in the future.

When to Use

  • After a session with significant mistakes or rework
  • When you notice patterns that could be prevented with better configuration
  • When explicitly requested via /claude-improve-config
  • Automatically triggered by the SessionEnd hook

Self-Reflection Process

1. Analyze the Session

Review the conversation for:

  • Repeated mistakes: Same error made multiple times
  • Misunderstandings: User had to correct Claude's interpretation
  • Inefficient workflows: Better approaches discovered late in the session
  • Tool misuse: Wrong tool for the job, excessive tool calls
  • Missing context: Information that would have helped if in CLAUDE.md
  • Ignored instructions: Existing CLAUDE.md rules that were violated

2. Categorize Issues

Rate severity:

  • Critical: Caused significant rework or user frustration
  • Moderate: Caused delays or minor corrections needed
  • Minor: Slight inefficiency but didn't impact outcome

Only propose changes for critical or moderate issues.

3. Propose Configuration Changes

Changes can include:

CLAUDE.md Updates:

  • New guardrails or constraints
  • Clarified existing instructions
  • Project-specific patterns to follow

New Hooks:

  • PreToolUse hooks to prevent specific mistakes
  • PostToolUse hooks to validate outputs
  • Stop hooks to enforce checks before completion

New Skills:

  • Reusable knowledge for recurring tasks
  • Best practices for specific domains

4. Format the Proposal

Present proposals clearly:

## Session Reflection

### Issues Identified

1. **[Critical/Moderate]** Brief description of the issue
   - What happened: ...
   - Why it happened: ...
   - Impact: ...

### Proposed Changes

#### Change 1: [Type - CLAUDE.md/Hook/Skill]

**Rationale:** Why this change prevents the issue

**Implementation:**
[Show the exact changes to make]

#### Change 2: ...

Guidelines

  • Only propose changes that are generalizable - don't add rules for one-off situations
  • Keep CLAUDE.md concise - prefer hooks for enforcement over verbose instructions
  • Test proposed hooks mentally - ensure they won't block legitimate workflows
  • Prefer minimal changes - one well-designed rule is better than many narrow ones
  • Consider false positives - hooks should not create friction for normal operations

Example Proposals

Example 1: Missing Test Verification

Issue: Claude claimed tests passed without running them.

Proposal: Add to CLAUDE.md:

**Test verification**: Never claim tests pass without showing actual test output. Always run `uv run pytest` with the specific test file before marking test-related tasks complete.

Example 2: Repeated Lint Failures

Issue: Code was submitted with lint errors multiple times.

Proposal: Add PostToolUse hook for Write/Edit:

{
  "matcher": "Write|Edit",
  "hooks": [
    {
      "type": "command",
      "command": "ruff check --select=E,F $TOOL_INPUT.file_path 2>/dev/null || true"
    }
  ]
}

Example 3: Wrong Branch for PR

Issue: PR was created against wrong base branch.

Proposal: Add to CLAUDE.md:

**Pull requests**: Always verify the target branch before creating a PR. For this project, PRs should target `main` unless explicitly specified otherwise.

Non-Examples (Do NOT Propose)

  • One-off mistakes that won't recur
  • User preference differences (not errors)
  • Issues already covered by existing configuration
  • Overly specific rules that won't generalize
  • Changes that would slow down normal workflows significantly

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.