agentleFS
5uck1ess5uck1ess/devkit/skills/setup-rules/SKILL.md

setup-rules

Skill4 starsChanged 4 months agoMITView on GitHub

Install devkit coding rules to ~/.claude/rules/ for Claude Code language-specific auto-activation. Use when the user explicitly asks to set up devkit rules, install language rules, or run /devkit:setup-rules. One-shot installer with side effects (writes to ~/.claude/rules/) — user-only invocation, never auto-triggered. Under non-Claude hosts, use AGENTS.md and resources/rules/ as reference instead of installing Claude rules.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 2 are distinctive, and 1 is 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.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Verify plugin context and create the rules directory:

    line 17
  2. Distinctive:

    Check for existing customized rules — warn before overwriting:

    line 27
  3. Very specific:

    If any files in ~/.claude/rules/ differ from the plugin versions, tell the user which files will be overwritten and ask for confirmation …

    line 29

≈ “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

Setup Coding Rules

Install language-specific coding rules to ~/.claude/rules/. These auto-activate when Claude reads matching files and complement devkit's hooks — rules guide how to write, hooks catch what you missed. Non-Claude hosts do not read ~/.claude/rules/; use AGENTS.md and the files in resources/rules/ as project guidance.

What it does

Copies rule files from this plugin's resources/rules/ to ~/.claude/rules/. Existing files are overwritten — if the user has customized rules, warn them before overwriting. CLAUDE_PLUGIN_ROOT is set automatically by the Claude Code plugin runtime.

Steps

  1. Verify plugin context and create the rules directory:
if [ -z "${CLAUDE_PLUGIN_ROOT:-}" ]; then
  echo "ERROR: CLAUDE_PLUGIN_ROOT is not set. Run this as /devkit:setup-rules." >&2
  exit 1
fi
mkdir -p ~/.claude/rules
  1. Check for existing customized rules — warn before overwriting:

If any files in ~/.claude/rules/ differ from the plugin versions, tell the user which files will be overwritten and ask for confirmation before proceeding.

  1. Copy each rule file from the plugin:
cp "${CLAUDE_PLUGIN_ROOT}/resources/rules/go.md" ~/.claude/rules/go.md
cp "${CLAUDE_PLUGIN_ROOT}/resources/rules/typescript.md" ~/.claude/rules/typescript.md
cp "${CLAUDE_PLUGIN_ROOT}/resources/rules/python.md" ~/.claude/rules/python.md
cp "${CLAUDE_PLUGIN_ROOT}/resources/rules/rust.md" ~/.claude/rules/rust.md
cp "${CLAUDE_PLUGIN_ROOT}/resources/rules/shell.md" ~/.claude/rules/shell.md
  1. Confirm installation:
echo "Installed rules:" && ls ~/.claude/rules/*.md

Report which files were installed.

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.