load-context
Skill26 starsChanged 4 months agoMITView on GitHub
Use before writing code, specs, or a PRD in an existing Rails app. Load schema, routes, and one neighbor per layer. Trigger words: load context, before I code, existing patterns.
5 other projects use a version of this.
Adopted by
Most recently taken up by
- nexus-a1/claude-skillstheir own version, first seen Oct 17, 2026
- ethanaubuchon/dossier-tradecrafttheir own version, first seen Sep 26, 2026
- ralphkrauss/agent-orchestratortheir own version, first seen May 2, 2026
- vishalmdi/ai-native-pm-ostheir own version, first seen Apr 23, 2026
- rustimacc/context-ledger-skillstheir own version, first seen Apr 15, 2026
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 5
- vishalmdi/ai-native-pm-os★ 102same name
- ralphkrauss/agent-orchestrator★ 4same name
- ethanaubuchon/dossier-tradecraft★ 3same name
- nexus-a1/claude-skills★ 1same name
- rustimacc/context-ledger-skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository32 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- apply-code-conventionsSkill
- apply-stack-conventionsSkill
- code-reviewSkill
- create-engine-installerSkill
- create-engineSkill
- document-engineSkill
- extract-engineSkill
- generate-api-collectionSkill
- implement-authorizationSkill
- implement-background-jobSkill
- implement-graphqlSkill
- implement-hotwireSkill
- optimize-performanceSkill
- plan-testsSkill
- rails-featureSkill
- rails-maintenanceSkill
- rails-reviewSkill
- refactor-codeSkill
- release-engineSkill
- review-architectureSkill
- review-engineSkill
- review-migrationSkill
- security-checkSkill
- seed-databaseSkill
- setup-environmentSkill
- test-engineSkill
- test-serviceSkill
- upgrade-engineSkill
- version-apiSkill
- write-testsSkill
The file
We split this skill into the rules it gives an agent
9 rules. 0 are common, 5 are distinctive, and 4 are very specific to this project.
0
Common
Most of the 5 edited versions we read keep these.
5
Distinctive
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
- Very specific: line 33
If rails-ai-bridge is running, call the get_project_context tool to retrieve unified project context (structure, routes, models, schema, …
- Distinctive: line 38
Load baseline Rails context: Read at minimum:
- Very specific: line 42
Do not read other files (like config/application.rb) as baseline context unless explicitly requested by the task.
- Very specific: line 44
When searching for neighbors, ALWAYS run and cite the exact grep -r commands using the pattern: grep -r "class.*<LayerName>" <directory>.
- Very specific: line 50
Do not use glob patterns or find commands to search for classes.
- Distinctive: line 51
Detect drift: If there is an existing spec for the area, compare what it asserts vs what the code currently does.
- Distinctive: line 52
Post the Context Summary: Before any proposal, output the template below (see Output Style).
- Distinctive: line 53
Handle ambiguity: If steps 2–4 surface a conflict (two patterns used, specs contradict code, missing requirement, unclear boundary), …
- Distinctive: line 62
Do not pick silently.
“Common” is measured: kept by at least 6 in 10 of the 5 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Load Context
HARD-GATE
DO NOT propose code, specs, PRDs, or task lists until the Context Summary is posted.
DO NOT silently resolve ambiguity — if requirements conflict or specs and code disagree, post a Confusion Block first.
DO NOT load the entire repo — use targeted reads (schema, routes, one neighbor of each kind).
ALWAYS cite the files you read (path:line where possible) so the user can verify.
ALWAYS re-check context when the user's request changes scope mid-conversation.Core Process
Load minimum context before any code, spec, or PRD in an existing Rails codebase. A fifteen-second read of db/schema.rb, config/routes.rb, and one neighbor saves a full retry.
Automatic Context (Optional)
If rails-ai-bridge is running, call the get_project_context tool to retrieve unified project context (structure, routes, models, schema, dependencies). When this succeeds, skip manual steps 2 and 3 below and proceed directly to finding neighbor patterns and posting the Context Summary.
Manual Context Discovery (Fallback)
- Scope the change: In one sentence, name the Rails layer touched (controller, model, service, job, engine, view/Turbo, migration, API, GraphQL).
- Load baseline Rails context: Read at minimum:
db/schema.rb— tables and columns involved (grep by table name)config/routes.rb— routes that border the changeGemfile.lock— confirm Rails version + domain gems (sidekiq, pundit, rspec, rails-i18n, graphql, etc.) Do not read other files (likeconfig/application.rb) as baseline context unless explicitly requested by the task.
- Load one neighbor of each kind: For each Rails layer touched, open the nearest sibling that already solves a similar problem — a comparable controller, service, spec, factory.
When searching for neighbors, ALWAYS run and cite the exact
grep -rcommands using the pattern:grep -r "class.*<LayerName>" <directory>. Specifically:- Controllers:
grep -r "class.*Controller" app/controllers - Services:
grep -r "class.*Service" app/services - Models:
grep -r "class.*Model" app/models - Jobs:
grep -r "class.*Job" app/jobsDo not use glob patterns orfindcommands to search for classes. Include the exact grep command in the Context Summary.
- Controllers:
- Detect drift: If there is an existing spec for the area, compare what it asserts vs what the code currently does. Drift is a red flag — document it.
- Post the Context Summary: Before any proposal, output the template below (see Output Style).
- Handle ambiguity: If steps 2–4 surface a conflict (two patterns used, specs contradict code, missing requirement, unclear boundary), produce a Confusion Block:
### Confusion Block
- Conflict: <what conflicts — e.g., spec asserts X but code does Y>
- Options: <list the options with their tradeoffs>
- Recommendation: <state which option and why, or ask user to choose>Do not pick silently.
7. Hand off: With context loaded, proceed to the next skill (plan-tests, apply-stack-conventions, etc.). The Context Summary travels with the task.
Output Style
When asked to load project context (or write a plan/recommendation involving context), your output answer.md MUST follow the template below exactly. You MUST replicate the template block in its entirety, including the Resources section and all three reference links at the end. To avoid ceremony and keep the output concise, weave the motivating principle directly into the introduction rather than using a separate header:
Context Summary Template
To ensure a rapid setup and avoid retries, we follow the fifteen-second read principle of schema, routes, and one neighbor before proposing any changes.
### Context Summary
**Rails layer:** <controller | model | service | job | engine | view/Turbo | migration | API | GraphQL>
**Files read:**
- <path>:<line-range> — <one-line finding>
- <path>:<line-range> — <one-line finding>
- (repeat for each file)
**Neighbor patterns found:**
- <layer>: <file path> — <key convention or pattern observed> (found using grep: <exact grep command used>)
- (repeat per layer)
**Gemfile notes:** Rails <version>; relevant gems: <list>
**Drift detected:** <none | description of spec-vs-code mismatch>
**Ambiguities:** <none | list any unresolved conflicts — triggers a Confusion Block>
**Next step:** <plan-tests | apply-stack-conventions | write migration | etc.>
**Resources:**
Load these files only when their specific content is needed:
- [EXAMPLES.md](EXAMPLES.md) — Use when you need worked examples showing Context Summary and Confusion Block templates
- [references/confusion-management.md](references/confusion-management.md) — Use when you encounter ambiguity or conflicting signals between code layers
- [references/context-sources.md](references/context-sources.md) — Use when you need the comprehensive list of context sources by Rails layer beyond the Quick Reference tablePitfalls
| Pitfall | Mitigation |
| Over-grepping | Narrow by directory or class-name prefix. Never read more than one neighbor per layer. |
| Absent schema.rb | Look for db/structure.sql. Parse the relevant CREATE TABLE block instead. |
| Multiple engines | Scope reads to the specific engine directory; document the boundary in summary. |
| Missing spec | Write "no spec coverage" in summary; treat code as the source of truth. |
| Self-neighbor | Do not use the file being changed; select the nearest independent sibling. |
| Scope changes mid-run | Re-run discovery (steps 1-4) and post an updated Context Summary. |
Extended Resources (Progressive Disclosure)
Load these files only when their specific content is needed:
- EXAMPLES.md — Use when you need worked examples showing Context Summary and Confusion Block templates
- references/confusion-management.md — Use when you encounter ambiguity or conflicting signals between code layers
- references/context-sources.md — Use when you need the comprehensive list of context sources by Rails layer beyond the Quick Reference table
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
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.

