generate-scoped-instructions

generate-scoped-instructions is an agent for Claude Code from shuchitajain/awesome-ai-setup. It costs 26 tokens per session (2,865 once invoked), scanned A, original, MIT.

A tool that studies a code repository and creates instruction files for different kinds of files, along with a general instruction file. These instructions guide AI coding assistants according to the repository’s existing conventions.

In plain words
What is it for?
Use it to document conventions for areas such as application code, tests, interfaces, or other important file types, while accounting for existing instruction files and architecture documentation.
Why use it?
It reduces the need to repeat project rules and avoids applying unrelated guidance to every file. The generated rules are based on the code and dependencies already present.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: mentions CLAUDE.md; mentions Claude Code; mentions AGENTS.md.

Good fit Use it to document conventions for areas such as application code, tests, interfaces, or other important file types, while accounting for existing instruction files and architecture documentation.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/shuchitajain/awesome-ai-setup/generate-scoped-instructions
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.

Clone the repo
git clone --depth 1 https://github.com/shuchitajain/awesome-ai-setup

Made for: Claude Code.

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-scoped-instructions

README.md
[![agentmods](https://agentmods.dev/badge/agents/shuchitajain/awesome-ai-setup/generate-scoped-instructions/github.svg)](https://agentmods.dev/agents/shuchitajain/awesome-ai-setup/generate-scoped-instructions)
Your own site
<a href="https://agentmods.dev/agents/shuchitajain/awesome-ai-setup/generate-scoped-instructions"><img src="https://agentmods.dev/badge/agents/shuchitajain/awesome-ai-setup/generate-scoped-instructions/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for generate-scoped-instructions

Your own site · 80×15
<a href="https://agentmods.dev/agents/shuchitajain/awesome-ai-setup/generate-scoped-instructions"><img src="https://agentmods.dev/badge/agents/shuchitajain/awesome-ai-setup/generate-scoped-instructions.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 26 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,865 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00026 $0.02865
Opus 5 $0.00013 $0.01432
Sonnet 5 $0.00005 $0.00573
Haiku 4.5 $0.00003 $0.00286

Measured 10d ago against content hash 20c01fa24e2f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

generate-scoped-instructions 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 10d 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.

agents/generate-scoped-instructions.md · 324 lines

How it starts

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

Generate Scoped Instruction Files

You are generating scoped instruction files for this repository.

Scoped instructions are per-file-type rules that AI coding assistants apply automatically when working with specific files. Unlike a global instructions file (CLAUDE.md, copilot-instructions.md), scoped instructions apply only to matching files - making them more precise and less likely to cause noise.

The goal is to capture conventions that are actually present in the codebase, not conventions you'd recommend for this type of project.


Step 1 - Read the Repository

Gather the information needed to detect actual conventions.

Required reading:

  1. Dependency manifest - what libraries are actually in use (state management, testing, UI framework, code generation)
  2. Existing instruction files - CLAUDE.md, .github/copilot-instructions.md, .cursor/rules/global.mdc, .cursorrules - don't duplicate what's there
  3. Architecture file - ARCHITECTURE.md if present - understand the layer structure before generating layer-specific instructions

File sampling - read 3–5 examples of each relevant type:

For each file type that's significant in this project, sample files to detect conventions:

  • UI components/widgets/screens - detect base class, spacing patterns, state approach, theming patterns
  • State management files - detect provider/store/reducer patterns, state structure, naming
  • Test files - detect mock strategy, test structure, fixture patterns, assertion style
  • Data/API layer files - detect error handling patterns, serialization approach
  • Domain/business logic files - detect use case structure, entity patterns

Step 2 - Detect Conventions Per File Type

For each relevant file type, identify the consistent patterns. Assess each pattern:

  • Consistent (90%+ of sampled files follow it) → include as a rule
  • Majority (60–90% follow it) → include as a guideline, note it's not universal
  • Mixed → do not include (inconsistency is something to fix, not document as a convention)

Read the full file on GitHub · 324 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. 10d ago First seen · 324 lines · 26 tokens per session scan A 20c01fa24e2f

Subscribe to this mod's changes

generate-scoped-instructions is an agent published in the GitHub repository shuchitajain/awesome-ai-setup (5 stars, last pushed 3mo ago), licensed MIT. It adds 26 tokens to every session and 2,865 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-31.