agentleFS
Cogni-AI-OUCogni-AI-OU/cogni-ai-agent-skills/dot-claude/SKILL.md

dot-claude

Skill4 starsChanged 6 months agoMITView on GitHub

Configure and manage Claude Code (.claude) workspace settings, permissions, and tool hooks.

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 2 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    When working with the Anthropic Claude API or Claude documentation.

    line 20
  2. Distinctive:

    When configuring generic coding standard rules instead of Claude-specific behavior.

    line 21
  3. Very specific:

    Locate or Create Configuration: Ensure the .claude directory exists at the root of the project.

    line 25
  4. Very specific:

    Define Permissions: Use .claude/settings.json to explicitly allow specific Bash commands to prevent Claude Code from blocking them.

    line 26
  5. Very specific:

    Explicit Permissions: Instead of granting broad permissions, use precise glob patterns (e.g., Bash(uv tool *)).

    line 32
  6. Very specific:

    Fail-Safe Hooks: Ensure PreToolUse hooks return appropriate exit codes (e.g., exit 2) to block destructive commands.

    line 34

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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

dot-claude

<!-- markdownlint-disable MD013 MD023 MD031 MD032 -->

When to Use

  • Configuring allowed tools and bash permissions for Claude Code.
  • Defining PreToolUse or PostToolUse hooks for specific commands or file edits.
  • Setting up environment variables or enabling LSP plugins for Claude Code.
  • Analyzing or updating the .claude/settings.json workspace configuration.

When Not to Use

  • When working with the Anthropic Claude API or Claude documentation.
  • When configuring generic coding standard rules instead of Claude-specific behavior.

Core Process

  1. Locate or Create Configuration: Ensure the .claude directory exists at the root of the project.
  2. Define Permissions: Use .claude/settings.json to explicitly allow specific Bash commands to prevent Claude Code from blocking them.
  3. Configure Hooks: Set up PreToolUse or PostToolUse hooks in settings.json to enforce safety checks, trigger auto-formatting, or log activity.
  4. Set Environment & Plugins: Enable required tools like language servers (pyright-lsp) or specify environment variables.

Best Practices

  • Explicit Permissions: Instead of granting broad permissions, use precise glob patterns (e.g., Bash(uv tool *)).
  • Hook Activity Logging: Redirect output from hooks into a specific log file like .claude/hook-activity.log to trace tool side effects.
  • Fail-Safe Hooks: Ensure PreToolUse hooks return appropriate exit codes (e.g., exit 2) to block destructive commands.

Common Pitfalls

  • JSON Syntax Errors: settings.json must be strictly valid JSON, without trailing commas or comments.
  • Overly Broad Matchers: Be precise with matcher regex in hooks to avoid triggering scripts unnecessarily (e.g., Edit|Write vs just Bash).

References

  • Example settings.json

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.