Agent skill

Rules Create Global

by coleam00 in coleam00/skills

Set up your project's global rules, a lean and well-structured root CLAUDE.md (plus a starter .claude/), following the course methodology.

MITAuto-check passedProduct & Project Management

Install Rules Create Global

skills CLI
$ npx skills add coleam00/skills --skill rules-create-global -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install coleam00/skills rules-create-global --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/coleam00/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/rules-create-global .claude/skills/rules-create-global && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
rules-create-global
GitHub stars
670
Token cost
~3.2k tokens
SKILL.md length
1,702 words
Files
1
Skills in repo
34
Repo updated
First seen
Licence
MIT

At a glance

Set up your project's global rules, a lean and well-structured root CLAUDE.md (plus a starter .claude/), following the course methodology.

  • Works in 6 steps: Read the inputs → Derive the root CLAUDE.md → Extract on-demand context → …
  • Re-deriving the AI Layers rules
  • SKILL.md covers Inputs: wire the arguments first, What global rules are…, Two situations, one motion and Required reading (do this…, plus 4 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Rules Create Global is an agent skill from coleam00/skills. Set up your project's global rules, a lean and well-structured root CLAUDE.md (plus a starter .claude/), following the course methodology. Greenfield: pass your PRD and/or architecture-spec path and it derives rules from your engineering decisions (a PRD alone is product context). Brownfield: leave it blank to derive from your primed codebase (run /prime-codebase first), or pass a codebase-analysis doc for a large repo. Use when initializing or re-deriving the AI Layer's rules, onboarding a codebase, or replacing…

Its SKILL.md is about 3.2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Product & Project Management, covering PRD writing, Codebase onboarding and Agent instruction files. The repository describes itself as: The agent skills I actually use to build software with coding agents. The PIV loop, planning, worktrees, and the meta-skills for building your own AI Layer. The licence is MIT.

When your agent uses it

  • Re-deriving the AI Layers rules
  • Onboarding a codebase
  • Replacing a generic /init output

Example prompts

  • “/rules-create-global”

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Read the inputs
  2. Derive the root CLAUDE.md
  3. Extract on-demand context
  4. Find the seams
  5. Prune to lean
  6. Report

What it can do on your machine

Read from SKILL.md and the folder at commit 847be08. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • code.claude.com
    • agents.md

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Rules Create Global loads about 3.2k tokens when it runs. Until then it costs about 151 tokens; SKILL.md has 1,702 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~151
When it runs · the whole SKILL.md, loaded when a task matches
~3.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from coleam00/skills at commit 847be08, republished under its MIT licence (© coleam00). 1,702 words, ~3,184 tokens.

Download SKILL.mdSave it as .claude/skills/rules-create-global/SKILL.md (or your agent's skills folder).
name
rules-create-global
description
Set up your project's global rules, a lean and well-structured root CLAUDE.md (plus a starter .claude/), following the course methodology. Greenfield: pass your PRD and/or architecture-spec path and it derives rules from your engineering decisions (a PRD alone is product context). Brownfield: leave it blank to derive from your primed codebase (run /prime-codebase first), or pass a codebase-analysis doc for a large repo. Use when initializing or re-deriving the AI Layer's rules, onboarding a codebase, or replacing a generic /init output. The customizable replacement for /init.
argument-hint
[prd-path] [architecture-path] (greenfield; brownfield: blank + prime first, or pass a codebase-analysis)
arguments
path1, path2

Create Rules: Set Up Your Project's Global Rules

Inputs: wire the arguments first

This skill takes up to two optional paths and uses them to pick your lane. Read whatever was passed and classify each by its content:

  • $path1: the first path, if any.
  • $path2: the second path, if any.
A passed path that is...LaneUse it as
a PRD (intent, what/why, from plan-create-prd)greenfieldproduct context (the "what this is"), NOT the source of technical rules
an architecture / spec doc (the how, from plan-architecture)greenfieldthe technical decisions your rules derive from (may be the same file as the PRD, if the architecture was folded in as an ## Architecture section)
a codebase-analysis doc (a large-repo /prime-codebase + subagent fan-out)brownfieldthe source of "what is"

Pick the lane from what you were given:

  • Greenfield if a PRD and/or architecture path was passed, or the workspace is a bare scaffold: derive what should be from the architecture decisions ($path2, or $path1 if that is where they live).
  • Brownfield if no path was passed, or a codebase-analysis path was: derive what is from the analysis doc if one was passed, otherwise from the primed codebase in this conversation.

Brownfield, not primed yet? If no path was passed and this conversation has not been primed on the code, run /prime-codebase first (or offer to) so you derive from real files, then continue. Never invent rules from nothing.

What global rules are (30-second intro)

Your global rules — CLAUDE.md (Claude-native) or AGENTS.md (the open cross-tool standard) — are the always-on steering document, read on every task. Four kinds of content earn that always-on slot:

  1. A map of the codebase — the dirs/files that matter, each with a one-line what it is + why it lives there.
  2. Ground rules — the specific conventions this project follows (how you do type safety, your error philosophy, your git workflow). State the choice, not a slogan.
  3. Commands the agent should run itself — the real lint / type-check / test / tooling CLIs (with their flags), so it can check its own work. (Not slash-commands — those are skills.)
  4. Working principles (agent steering) — how you want the agent to operate here: its thinking/reasoning posture (plan before non-trivial work, ask when ambiguous instead of guessing, keep scope tight) and the engineering primitives you hold (fail fast, explicit errors, single responsibility, simplest thing that works). These don't live in the code — you state them. They're the part deriving-from-the-codebase can never produce — and the part an agent won't reliably follow unless you make it explicit.

It's all composition. Rules, references, and skills are just markdown the agent loads when it needs them — so any of the above can live always-on or in an on-demand references/ doc or in a skill; you choose where each piece lives. Everything not needed every task loads on demand, or belongs in a per-task plan — not here.

Two situations, one motion

Global rules encode technical truth — so you derive them from technical decisions, never from a product spec:

You have...Derive rules from..."Truth" is...
Greenfield, a new project, mostly a scaffoldyour architecture decisions (the technical "how" you settled with the AI), passed as $path2what should be
Brownfield, an existing codebase with no AI Layeryour primed codebase (/prime-codebase), or a codebase-analysis doc passed as a path for a large repowhat is

Greenfield note: your rules come from your architecture decisions (the spec), not the PRD. The flow: discuss what you're building with the AI and capture it as a PRD (plan-create-prd), then settle the architecture with plan-architecture (stack, patterns, directory structure, conventions). Those decisions are what this skill derives rules from. A PRD captures the product (what/why): useful context, but technical rules don't live there.

Brownfield note: this skill does not explore the codebase for you. Prime first: run /prime-codebase so the structure, key files, and conventions are loaded into this conversation, then run this skill with no path. (Large repo? Optionally fan out a few built-in subagents to explore areas in parallel, aggregate a short codebase-analysis.md, and pass that path instead.) This skill packages the derive → extract → seams → prune → check steps, not the exploration.

Before you run this — protect any existing rules. If the project already has a CLAUDE.md / AGENTS.md, copy or rename it first (e.g. CLAUDE.md.bak) so this skill doesn't overwrite something you want to keep. Even better, feed it in as input — point the skill at it ("read my existing CLAUDE.md first") so the derivation builds on what's already there instead of starting from scratch.

Required reading (do this first) — and pick the file

First, which rules file does this project use? Detect it, then read the matching guidance (don't rely on a snapshot):

  • CLAUDE.md (Claude Code's native file) → Anthropic memory + best practices: https://code.claude.com/docs/en/memory · https://code.claude.com/docs/en/best-practices
  • AGENTS.md (the open cross-tool standard, read by dozens of agents) → the AGENTS.md spec: https://agents.md
  • Both present? Usually the shared content lives in AGENTS.md and CLAUDE.md is a single line — @AGENTS.md — so Claude Code auto-loads AGENTS.md and there's one source of truth. In that case, write to AGENTS.md.
  • Neither yet? CLAUDE.md for a Claude-Code-only project; AGENTS.md if the team is multi-tool.

Content + structure are ~90% identical either way — everything below is "your rules file," not one vendor's. Use the structure laid out below (it works as an AGENTS.md just as well).

The methodology (bake this in)

  • What goes always-on: the map + ground rules (specific conventions) + the working principles (agent steering). Everything true project-wide, every task.
  • Working principles are elicited, not derived. The map + ground rules come from the code/decisions; the working principles come from you — so ask: "how should the agent work here — plan-first? clarify before coding? scope discipline? which engineering primitives do you hold?" Keep only the ones that actually change behavior and reflect your stance — not a generic lecture the model already follows.
  • The four destinations — sort every candidate line:
    • Keep always-on → map / ground rules.
    • Push to on-demand → a recurring but task-type-specific pattern → an on-demand reference (.claude/references/<topic>.md on Claude Code; anywhere your tool looks — e.g. .agent/ — it's just markdown) or a skill.
    • Move to a plan → task-specific "what to build next" content → it was never a rule.
    • Delete → redundant, or a slogan the model already follows ("write clean code", "KISS/DRY").
  • State the choice, not the slogan: "derive types with z.infer", not "type safety is critical".
  • Brownfield = "what is", not "what should be": every rule must point to the file that proves it; if you can't, leave it out. Aspirational rules make the agent fight the codebase.
  • Lean: don't bloat it to the point it eats context or the agent starts ignoring its own rules. No magic line number — cut anything that wouldn't cause a mistake if removed.
Show full SKILL.md (593 more words)Show less

Workflow

1. Read the inputs
  • Greenfield: read the architecture / spec doc you passed as $path2 (or $path1, if that is where the architecture lives): stack, patterns, directory structure, conventions, security choices, plus any scaffold files. (A PRD passed as $path1 is product context: read it for what you're building and why, not for the technical rules.) No path passed but the workspace is a fresh scaffold? Ask for the architecture doc, or settle the decisions now with plan-architecture first.
  • Brownfield: derive from the primed codebase already loaded in this conversation (from /prime-codebase); or, if a codebase-analysis.md path was passed, read that (with its file:line citations). Spot-check the actual code either way. Not primed and no path passed? Run /prime-codebase first.
  • If a rules file already exists: read it first and treat it as a starting point — and make sure it's backed up (see "protect any existing rules" above) so nothing you wrote by hand is lost.
  • Read the best-practices docs above. Follow the structure laid out in this skill.
2. Derive the root CLAUDE.md

Fill the template's sections, sourced from the input:

  • What this is — one paragraph + the stack in one line.
  • Architecture map — the tree of dirs/files that matter, one-line what/why each.
  • Ground rules — the specific conventions (greenfield: decided in your architecture spec, not the PRD; brownfield: observed in the code, each traceable to a file).
  • Working principles (agent steering) — ask the user (this can't be derived from code): how should the agent operate here? Capture the thinking/reasoning posture (plan-first, clarify-don't-guess, scope discipline, verify against the real suite) + the engineering primitives they hold (fail fast, explicit errors, single responsibility, simplest-thing-that-works). State the project's actual stance; keep it lean.
  • Commands — the few you actually run (install / test / type-check / lint / run).
  • On-demand pointers — where detail loads when needed. Don't dump the PRD or the analysis in. Link to them.
3. Extract on-demand context

Pull recurring, task-type-specific patterns out into .claude/references/<topic>.md stubs (a paragraph each, not full docs). Test: does it recur every time you touch that area? → guide. One-off → leave in the source doc.

4. Find the seams

Add a short "where new code goes" section — the interfaces/folders where new work plugs in. This is what makes the agent extend the codebase instead of bolting on. (Greenfield: the seams are designed from the architecture, not discovered.)

5. Prune to lean

First draft is always too big. Delete generic advice, restated defaults, and anything that can't point to its evidence. Apply the per-line test: would removing this cause a mistake? If not, cut it.

6. Report
  • Files created/changed.
  • A 3–5 line summary of what went into CLAUDE.md and why.
  • What was pushed to on-demand context (and where).
  • Next step: the rules are ready — start the first PIV loop.

Quality checks

  • ✅ Root CLAUDE.md is a map + ground rules, not documentation or a PRD/analysis copy.
  • ✅ Every ground rule is a specific choice (brownfield: traceable to a file) — no slogans.
  • ✅ A working-principles / agent-steering section exists — elicited from the user (plan / clarify / scope posture + engineering primitives), lean and behavior-changing, not generic filler.
  • ✅ Recurring task-type detail lives in .claude/references/, not always-on.
  • ✅ Lean enough that nothing earns its slot without paying rent.

Notes

  • Rules evolve — revisit CLAUDE.md as the project grows and after major model releases, and run /rules-check-drift before merges so the map never drifts.
  • Greenfield: run after you've settled the architecture with plan-architecture (and after plan-create-prd, if you wrote a PRD for the product); pass those paths in as $path1 (PRD) and $path2 (architecture). Brownfield: run after /prime-codebase, or after a large-repo fan-out produces a codebase-analysis.md you pass in.

© coleam00, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/rules-create-global of coleam00/skills.

Open the folder on GitHubat commit 847be08

Compare with similar skills

Rules Create Global next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Rules Create Global compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Rules Create Global this skillcoleam00/skills670—~3.2kAutomated safety check: PassMIT
Fireauto Init Guideimgompanda/fireauto140—~400Automated safety check: PassMIT
Build Project Docszrt-ai-lab/opencode-skills287—~893Automated safety check: PassNone
Setup Matt Pocock Skillsywwynm/EverythingDone1449 repos~1.7kAutomated safety check: PassGPL-3.0
Ad ReviewCorridorTech/PoseCap224—~2.4kAutomated safety check: NotesApache-2.0
CCPM Project Managementautomazeio/ccpm8.4k—~1.1kAutomated safety check: PassMIT

Similar skills

  • Fireauto Init Guide

    imgompanda/fireauto

    새 프로젝트를 시작할 때 자동으로 PRD, CLAUDE.md, Wiki, 마일스톤을 생성하세요. An agent skill from imgompanda/fireauto.

    140 GitHub stars~400 tokensUpdated 6 mo ago
    Product & Project ManagementAuto-check passed
  • Build Project Docs

    zrt-ai-lab/opencode-skills

    为项目构建分层式LLM友好文档体系。已有项目:扫描项目结构→架构分类→生成CLAUDE.md主索引→基础模块文档→业务模块API/数据模型/坑点文档→配置文档→git变更日志(含风险评估+回滚指南)→交叉验证。新项目:解析PRD→按脚手架规范设计架构→需求拆解为开发任务→融合代码规范生成CLAUDE.md开发指南→模块级API设计+数据模型+开发清单。当用户需要为项目创建AI编程文档、建立项目索…

    287 GitHub stars~893 tokensUpdated 2 mo ago
    Product & Project ManagementAuto-check passed
  • Setup Matt Pocock Skills

    ywwynm/EverythingDone

    Sets up an Agent skills block in AGENTS.md/CLAUDE.md and docs/agents/ so the engineering skills know this repo's issue tracker (GitHub or local markdown), triage label vocabulary, and domain doc…

    144 GitHub starsUsed in 9 repos~1.7k tokens
    Agent WorkflowsAuto-check passed
  • Ad Review

    CorridorTech/PoseCap

    Two-axis fresh-context code review per WORKFLOW §10. An agent skill from CorridorTech/PoseCap.

    224 GitHub stars~2.4k tokensUpdated yesterday
    DevelopmentAuto-check: notes
  • Runs a spec-driven workflow from PRD to epic to GitHub issues to parallel agents, with status, standup and blocked-work reports from bundled scripts.

    8.4k GitHub stars~1.1k tokensUpdated 6 mo ago
    Product & Project ManagementAuto-check passed
  • Review

    fossasia/eventyay-interpretation

    Review the changes since a fixed point (commit, branch, tag, or merge-base) along two axes — Standards (does the code follow this repo's documented coding standards?) and Spec (does the code match…

    1.6k GitHub starsUsed in 35 repos~996 tokens
    Product & Project ManagementAuto-check passed

More from coleam00/skills

All 34 skills in this repo
  • Ablate AI Layer

    coleam00/skills

    Measure whether a repository's AI instructions still earn their place, by running the same real task many times with the layer intact and with it stripped, then grading every rule against what…

    670 GitHub stars~1.9k tokensUpdated today
    Auto-check passed
  • Build Dark Factory

    coleam00/skills

    Take a PRD and build a dark factory around it - a repository that takes work in as an issue and ships validated code out with nobody at the keyboard - one component at a time, into the user's actual…

    670 GitHub stars~12k tokensUpdated today
    Auto-check passed
  • Drive Screen

    coleam00/skills

    Take real control of the desktop - list and focus windows, type, paste, click, scroll, and screenshot - on Windows, macOS or Linux, and drive other coding-agent sessions running in terminals.

    670 GitHub stars~5.4k tokensUpdated today
    Auto-check passed
  • Second Brain Audit

    coleam00/skills

    Audit any second brain, notes folder, or agent memory for facts that have quietly stopped being true, then fix the worst one so it stops recurring.

    670 GitHub stars~4.6k tokensUpdated today
    Auto-check passed
  • Build Signal Engine

    coleam00/skills

    Build a personal signal engine from scratch - a system that reads every source someone cares about each day (changelogs and release notes, communities, feeds, videos, papers), makes a quick decision…

    670 GitHub stars~2.9k tokensUpdated today
    Auto-check passed
  • Worktree Create

    coleam00/skills

    Create one or more git worktrees for parallel development, each on its own branch with gitignored config copied in, dependencies installed, and a health check, by fanning out a setup subagent per…

    670 GitHub stars~958 tokensUpdated today
    Auto-check passed

Questions about Rules Create Global

What does Rules Create Global do?

Set up your project's global rules, a lean and well-structured root CLAUDE.md (plus a starter .claude/), following the course methodology. Rules Create Global is an agent skill from coleam00/skills.claude/), following the course methodology.

When should I use Rules Create Global?

Rules Create Global fits situations like: re-deriving the AI Layers rules; onboarding a codebase; replacing a generic /init output.

How do I install Rules Create Global in Claude Code?

Run `npx skills add coleam00/skills --skill rules-create-global -a claude-code`. Or copy the skill folder (.claude/skills/rules-create-global in coleam00/skills) into .claude/skills/rules-create-global in your project. Claude Code loads it when a task matches its description.

How do I install Rules Create Global in Codex?

Run `npx skills add coleam00/skills --skill rules-create-global -a codex`. Or copy the skill folder (.claude/skills/rules-create-global in coleam00/skills) into .agents/skills/rules-create-global in your project. Codex loads it when a task matches its description.

Can I use Rules Create Global in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add coleam00/skills --skill rules-create-global -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/rules-create-global, .gemini/skills/rules-create-global, .github/skills/rules-create-global and .opencode/skills/rules-create-global in your project.

What does Rules Create Global need to run?

SKILL.md names no scripts, command-line tools or credentials: Rules Create Global is instructions for the agent only.

Does Rules Create Global access the network?

SKILL.md names 2 domains. As links in the text: code.claude.com and agents.md. This is read from the text; nothing was executed.

Is Rules Create Global safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Rules Create Global use?

Rules Create Global is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Rules Create Global use?

About 3.2k tokens (SKILL.md is roughly 13k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Rules Create Global?

Skills that share tags, products or a category with Rules Create Global: Fireauto Init Guide (imgompanda/fireauto, 140 stars), Build Project Docs (zrt-ai-lab/opencode-skills, 287 stars), Setup Matt Pocock Skills (ywwynm/EverythingDone, 144 stars) and Ad Review (CorridorTech/PoseCap, 224 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Rules Create Global?

coleam00 (a GitHub user) maintains it in coleam00/skills, which has 670 GitHub stars. The repository holds 34 skills in this directory. The repository was last updated on October 7, 2026.

Source: coleam00/skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.