init-references
Skill1 starsChanged 8 months agoMITView on GitHub
Bootstrap the project reference files for Laravel, React, React Native, frontend-only, or mixed monorepo repositories. Detects the real stack, explores the codebase, and creates only the applicable missing files inside references/. Use this at project startup and whenever a brand-new stack is added later.
In this repository12 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- create-prSkill
- delete-branchSkill
- dev-workflowSkill
- fix-planSkill
- implement-fixSkill
- implement-planSkill
- merge-mainSkill
- plan-featureSkill
- read-referencesSkill
- test-lintSkill
- update-referencesSkill
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 7 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 19
Run from the project root.
- Very specific: line 39
Mark uncertainty clearly: Use [REVIEW NEEDED] when the code does not support a confident conclusion.
- Distinctive: line 41
Stay compatible with Claude Code: If the current session is in read-only planning mode, stop after the bootstrap summary instead of writing …
- Very specific: line 60
Ensure references/ exists.
- Distinctive: line 123
Create only the missing files that are applicable for the detected stack(s).
- Distinctive: line 125
If every applicable file already exists, output:
- Distinctive: line 133
If a new stack was added later, create only the newly applicable missing maps.
- Distinctive: line 137
Write the missing files using the formats below.
- Distinctive: line 311
After writing, report exactly which files were created, skipped, or marked not applicable.
≈ “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.
Files
Skill: /init-references
Usage
/init-referencesRun from the project root.
Purpose
/init-references is the most important step in this repository.
Its job is to create the durable project maps in references/ so future Claude
Code tasks can read those maps first instead of repeatedly re-reading the whole
codebase.
Core rules
- Read before write. Explore the real project first. Never invent files, routes, tables, hooks, screens, services, or conventions.
- Generate only applicable files. Absent reference files mean the stack is not present in this repo.
- Do not overwrite existing maps. By default, create only missing, applicable files. If a map already exists, keep it.
- Be stack-aware. A repo can contain Laravel, React, React Native, or any combination of them across root or monorepo app folders.
- Mark uncertainty clearly. Use
[REVIEW NEEDED]when the code does not support a confident conclusion. - Stay compatible with Claude Code. If the current session is in read-only planning mode, stop after the bootstrap summary instead of writing files.
Applicability matrix
references/schema.md→ create when Laravel-style migrations or a database schema source are presentreferences/backend_map.md→ create when Laravel backend code is presentreferences/frontend_map.md→ create when React web or frontend code is presentreferences/mobile_map.md→ create when React Native / Expo code is presentreferences/methodology.md→ create for every supported project because the workflow still needs a conventions map
Workflow
1. Pre-flight
- Confirm the command is running from the project root
- Ensure
references/exists; create it if needed - Record which reference files already exist
Output a compact pre-flight table:
INIT-REFERENCES PRE-FLIGHT
references/schema.md -> missing | exists | not applicable
references/backend_map.md -> missing | exists | not applicable
references/frontend_map.md -> missing | exists | not applicable
references/mobile_map.md -> missing | exists | not applicable
references/methodology.md -> missing | exists2. Detect stack roots
Inspect the repository root and common monorepo folders such as apps/*,
packages/*, and services/*.
Detect each stack independently:
- Laravel:
composer.jsoncontainslaravel/framework, plus expected app folders such asapp/,routes/, ordatabase/ - React web:
package.jsoncontainsreact, and the app is not only a React Native app - React Native:
package.jsoncontainsreact-native, or the app has Expo or native mobile roots such asapp.json,android/, orios/ - Frontend-only: HTML/CSS/JS app structure without Laravel or React Native
For monorepos, list each detected app root and keep those roots visible in the generated reference files.
3. Explore only the applicable stack(s)
Laravel exploration
- Migrations and schema sources
- Routes and route groups
- Controllers, services, actions, repositories, models, jobs, events, notifications, API resources, policies, middleware, and auth flow
React / frontend exploration
- App root, routing, pages, components, stores, hooks, services, shared types, API client setup, forms, styling, and testing approach
React Native exploration
- Expo or native config, navigators, screens, platform-specific files, storage, app services, build config, and mobile-specific constraints
Methodology exploration
- Naming conventions
- Architecture patterns
- State-management patterns
- API response patterns
- Testing conventions
- Security constraints
- Existing repository workflow conventions that should guide future tasks
4. Decide what to create
Create only the missing files that are applicable for the detected stack(s).
If every applicable file already exists, output:
All applicable reference files already exist.
This project is already bootstrapped.
Use /update-references auto after code changes.If a new stack was added later, create only the newly applicable missing maps.
5. Write the files
Write the missing files using the formats below.
Required file formats
references/schema.md
Include:
- project/app root for the schema source
- one section per table
- columns, types, nullability, defaults, key notes
- relationship notes where they can be traced confidently
- schema gotchas or review-needed items
Suggested structure:
# Database Schema Reference
## Overview
## {table_name}
| Column | Type | Nullable | Default | Notes |
| --- | --- | --- | --- | --- |
**Relations**
- belongs to:
- has many:
## Known Issues / Gotchasreferences/backend_map.md
Include:
- Laravel app root(s)
- route groups and important endpoints
- controller → service/action/repository flow
- key models and relationships
- auth, middleware, queue, event, and resource notes when present
- backend gotchas
Suggested structure:
# Laravel Backend Map
## App Roots
## Routing Overview
## Route Flow Map
## Controllers
## Services / Actions
## Repositories
## Models
## Jobs, Events, Notifications
## Auth / Middleware Notes
## Known Issues / Gotchasreferences/frontend_map.md
Include:
- web app root(s)
- routing and page structure
- state stores
- data-fetching hooks and services
- significant shared components
- important types/interfaces
- frontend gotchas
Suggested structure:
# Frontend Map
## App Roots
## Routing
## API Configuration
## Stores
## Hooks
## Pages
## Shared Components
## Types / Interfaces
## Known Issues / Gotchasreferences/mobile_map.md
Include:
- mobile app root(s)
- navigation structure
- screens inventory
- Expo/native plugins and device integrations
- storage and auth notes
- platform-specific files or caveats
- mobile gotchas
Suggested structure:
# Mobile Map
## App Roots
## Navigation
## Screens
## Services
## Storage / Auth
## Platform-Specific Notes
## Build Configuration
## Known Issues / Gotchasreferences/methodology.md
Include:
- the project's preferred architecture patterns
- naming conventions and file placement rules
- stack-specific working rules
- testing expectations
- security rules
- known gaps that future tasks should treat carefully
Suggested structure:
# Project Methodology
## Core Philosophy
## Laravel Standards
## React / Frontend Standards
## React Native Standards
## Naming Conventions
## Testing Conventions
## Security Rules
## Known Gaps / Review NeededCompletion report
After writing, report exactly which files were created, skipped, or marked not applicable.
End with:
/init-references complete
Next step: use the generated references as the primary map for planning and
implementation, then run /update-references auto after code changes.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.

