generate-rules

generate-rules is a skill for Claude Code, Codex from coddy-project/coddy-agent. It costs 22 tokens per session (934 once invoked), scanned A, original, MIT.

A codebase-scanning helper that creates or refreshes focused project rules under .coddy/rules/. It derives them from the repository’s documentation, manifests, source layout, tests, existing rules, and CI setup.

In plain words
What is it for?
Use it to inspect a repository, understand its technology and testing practices, check existing rules for overlap, and generate updated project-specific guidance.
Why use it?
It reduces the need to explain a project’s conventions manually and helps keep generated guidance based on the code that is actually present.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/coddy-project/coddy-agent/generate-rules
Any agent
npx skills add coddy-project/coddy-agent --skill generate-rules
Clone the repo
git clone --depth 1 https://github.com/coddy-project/coddy-agent

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for generate-rules

README.md
[![agentmods](https://agentmods.dev/badge/skills/coddy-project/coddy-agent/generate-rules.svg)](https://agentmods.dev/skills/coddy-project/coddy-agent/generate-rules)
Your own site
<a href="https://agentmods.dev/skills/coddy-project/coddy-agent/generate-rules"><img src="https://agentmods.dev/badge/skills/coddy-project/coddy-agent/generate-rules.svg" alt="Measured on agentmods" height="20"></a>
Per session 22 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 934 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00022 $0.00934
Opus 5 $0.00011 $0.00467
Sonnet 5 $0.00004 $0.00187
Haiku 4.5 $0.00002 $0.00093

Measured 6d ago against content hash 8c217f5deb95, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

generate-rules scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

internal/skills/bundled/generate-rules/SKILL.md · 84 lines

How it starts

The opening of the file, as written. The whole thing — 84 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Generate project rules

Use this skill when the user invokes /generate-rules. Behave like Cursor's built-in "Generate Cursor Rules": analyse the codebase first, derive rules from what you find, then write them without asking the user to describe the project.

Phase 1 — scan (do this before writing anything)

Read in order, skimming for patterns:

  1. README.md, AGENTS.md, DESIGN.md — stated purpose, tech stack, conventions
  2. Build / package manifest: go.mod, package.json, Cargo.toml, pyproject.toml, Makefile — languages, dependencies, build commands, test commands
  3. Top-level directory layout (ls) — identify main packages / layers
  4. internal/ or src/ root — two or three representative source files per package (not all files)
  5. *_test.go / *.test.* / tests/ — understand test strategy and naming
  6. Existing rules under .cursor/rules/, .coddy/rules/, .claude/rules/ — read every file to avoid duplicates and understand what is already covered
  7. CI config (.github/workflows/, Dockerfile, .pre-commit-config.yaml) if present

Skip binary, generated, or vendored files.

Phase 2 — plan

After scanning, output a brief plan (not the rules yet): a table listing each proposed file, its globs/type, and one-line purpose. Ask the user to confirm, adjust scope, or skip topics before writing.

Example:

File Type Purpose
architecture.mdc always, **/*.go layer dependencies and import direction
code-style.mdc always, **/*.go formatting, lint, comment language
testing.mdc always, **/*_test.go test commands, table-driven conventions
api-layer.mdc manual HTTP handler patterns and OpenAPI sync

Update or skip existing files that already cover a topic well.

Phase 3 — write

Write each confirmed file. Default target directory:

  • .cursor/rules/ if it already exists in the repo
  • Otherwise .coddy/rules/
  • Use .claude/rules/ only if the user explicitly asks

Read the full file on GitHub · 84 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 84 lines · 22 tokens per session scan A 8c217f5deb95

Subscribe to this mod's changes

generate-rules is a skill published in the GitHub repository coddy-project/coddy-agent (128 stars, last pushed today), licensed MIT. It adds 22 tokens to every session and 934 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

copilot-pr-review-loop

Drive a GitHub pull request through repeated rounds of Copilot code review until convergence. Use when the user asks to "request Copilot review", "run a Copilot review loop", iterate on Copilot feedback, or wants automated triage-and-respond on Copilot PR comments. Covers re-request mechanics, open-thread filtering…

microsoft/intelligent-terminal · 91 tokens

upstream-sync

Periodically sync new commits from microsoft/terminal into this manually-forked intelligent-terminal repo by cherry-picking commit-by-commit onto a dated sync branch, auto-skipping revert pairs and empty commits, auto-resolving known take-upstream files, and stopping cleanly on genuine conflicts. The agent (you…

microsoft/intelligent-terminal · 139 tokens

release-notes

Generate user-facing release notes for Intelligent Terminal. Use when asked to write release notes, changelog, what-is-new summary, or prepare a release. Compares git commits between releases, looks up PR-linked issues and community contributors, then outputs formatted notes with "Verbed + Impact + Scenario" style…

microsoft/intelligent-terminal · 73 tokens

add-acp-agent-support

Add first-class support for an ACP-compatible agent CLI to Intelligent Terminal. Use when integrating a new built-in AI agent, ACP server command, authentication flow, model selection, interactive delegation, session hooks, onboarding, Settings, branding, GPO policy, documentation, tests, build, deployment, or live…

microsoft/intelligent-terminal · 72 tokens

pr-integration-test

Design, implement, and validate Intelligent Terminal integration tests for a target pull request or regression. Use when asked to add PR integration tests, convert a bug fix into E2E coverage, prove existing behavior still works, map tests to the release checklist, or verify E2E reports mark checklist cases complete.

microsoft/intelligent-terminal · 66 tokens

store-listing-localizer

Automate Microsoft Store (Partner Center) listing localization for Intelligent Terminal (Store ID 9NMQC2SSJX24). Use when asked to export/import Store listings, localize release notes / descriptions / captions / features into 80+ languages, update listingData CSV, or push Store listing translations without manually…

microsoft/intelligent-terminal · 97 tokens