| name | project-context |
|---|---|
| description | White-label project context skill template. Gives an AI agent immediate, structured understanding of your codebase, architecture, and ways of working. Fork this and fill in your own project details. |
When to use this skill: Read this at the start of any new conversation involving [Project Name] development. It replaces the need to re-explore the codebase from scratch.
This skill provides context. It does NOT grant permission to modify code.
The developer drives all decisions on this project. Follow these rules strictly:
-
Requirements come from the developer. Do not infer, assume, or invent requirements. If the developer's request is ambiguous, ask clarifying questions before proposing anything.
-
Propose before modifying. Before writing or editing any file, present your plan: what you intend to change, which files are affected, and why. Wait for explicit developer approval before proceeding.
-
Never modify design decisions autonomously. [Describe your project's protected design territory here -- e.g. game balance values, API contracts, database schemas, business logic rules, pricing, user-facing copy. These are decisions that belong to the developer, not the agent.]
-
Scope your work tightly. Only touch files directly relevant to the current task. Do not opportunistically refactor, rename, or "improve" code in files outside the agreed scope, even if you spot issues. Flag them for the developer instead.
-
Preserve existing comments and intent. When editing code, maintain all developer-authored comments explaining reasoning or design choices. Do not remove or rewrite them unless the developer specifically asks.
-
Confirm before running destructive commands. Do not run commands that delete files, reset state, overwrite data, or install dependencies without developer approval.
-
Use established patterns. This skill documents how the codebase works. When implementing changes, follow the conventions described here. Do not introduce new architectural patterns, libraries, or paradigms without discussion.
-
[Add any repo/deployment rules here.] [e.g. "Development happens in the private workspace. Production code is pushed to the public repo ONLY via the /deploy workflow. Never manually copy source files to the public repo."]
In short: Read -> Understand -> Discuss -> Plan -> Get Approval -> Implement. This is a collaborative workflow, not an autonomous one.
[Project Name] is a [type of project] built in [technology stack]. Run locally via [dev command] which serves at [local URL].
Core purpose / user flow: [Describe the primary thing the project does and how users interact with it.]
Authoritative documentation: See [path to main docs, e.g. README.md] in the project root. This is the single source of truth for [what it covers]. If you need to know [key details] -- read this file first.
[project-root]/
├── src/ # Application source code
│ ├── index.[ext] # Entry point
│ ├── config.[ext] # Constants, enums, feature flags
│ ├── [module].[ext] # [Brief description]
│ ├── [module].[ext] # [Brief description]
│ ├── [subsystem]/ # [Subsystem name] sub-modules
│ │ ├── [file].[ext] # [Brief description]
│ │ └── [file].[ext] # [Brief description]
│ └── ...
├── tests/ # Test suite
│ ├── [test-file] # [What it tests]
│ └── helpers/ # Test utilities
├── scripts/ # Build, deploy, and utility scripts
│ ├── build.[ext] # [What it does]
│ └── deploy.[ext] # [What it does]
├── public/ # Static assets (if applicable)
├── docs/ # Documentation (if separate from README)
├── .agents/ # AI agent workflows and skills
│ ├── workflows/ # Slash-command workflow definitions
│ └── skills/ # Context skills (including this file)
├── [config files] # package.json, tsconfig, etc.
├── README.md # [What it covers]
├── CHANGELOG.md # Version history
└── LICENSE # License type
[Describe your module system. Example: "All files use ES modules with
explicit import/export. There is no global namespace. The entry point
is src/main.js, loaded via <script type="module"> in index.html."]
[Describe your build process. Example: "Vite handles HMR in dev.
Production builds to dist/ via npm run build. Output is a single
bundled JS file + hashed assets."]
- [Library] -- [Purpose] ([how loaded: npm / CDN / vendored])
- [Library] -- [Purpose] ([how loaded])
- ...
[One sentence: what this system does and why it matters.]
Key properties / API:
| Property / Method | Type / Signature | Purpose |
|---|---|---|
[name] |
[type] |
[What it does] |
[name] |
[type] |
[What it does] |
Critical pattern: [Document the most important invariant. Example: "State mutations automatically trigger a UI re-render via a dirty flag. You do NOT need to manually trigger renders after state changes."]
[Repeat the same structure for each major system.]
| ID | Rule | Key Point |
|---|---|---|
| CODE_01 | [Rule name] | [One-line summary] |
| CODE_02 | [Rule name] | [One-line summary] |
| CODE_03 | [Rule name] | [One-line summary] |
| ... | ... | ... |
| ID | Principle |
|---|---|
| ARCH_01 | [e.g. "State and DOM are fully decoupled"] |
| ARCH_02 | [e.g. "CSS handles aesthetics; JS handles logic only"] |
| ARCH_03 | [e.g. "Single source of truth for all application state"] |
| ... | ... |
[2-3 sentence explanation of what this pattern is and why you use it.]
// Example code showing the pattern
[Repeat for each important pattern.]
Framework: [e.g. Playwright, Jest, Vitest, pytest]
Running tests:
[command to run all tests]
[command to run tests in watch/headed mode]
[command to run a specific test file]Test files: [Describe where tests live and naming conventions.]
Helpers: [Describe any shared test utilities, fixtures, or harness modules.]
[Describe your repository structure, branching strategy, and deployment pipeline.]
[Step-by-step: what happens when code goes to production.]
- Never [e.g. "push directly to main without the deploy workflow"]
- Never [e.g. "commit source files to the public repo"]
- ...
| Command | File | Purpose |
|---|---|---|
/[workflow] |
[path] |
[What it does] |
/[workflow] |
[path] |
[What it does] |
| ... | ... | ... |
| Metric / Value | Value | Config Location |
|---|---|---|
| [Key setting] | [Value] | [where it lives] |
| [Key setting] | [Value] | [where it lives] |
| ... | ... | ... |
- [Step one, including which file to modify]
- [Step two]
- [Step three]
- ...
- [Step one]
- [Step two]
- ...
- [Step one]
- [Step two]
- ...
-
[Short title]. [Explanation of the gotcha and what to do about it.]
-
[Short title]. [Explanation.]
-
[Short title]. [Explanation.]
This skill is a living document. Its value grows with the project, but only if it is reviewed and updated regularly.
Run a skill review after any of the following:
- A major feature is completed (new system, new module, significant refactor)
- A new architectural pattern is introduced (new module decomposition, new data flow)
- A painful debugging session reveals a non-obvious gotcha
- Files are renamed, moved, or deleted (file tree goes stale)
- A new workflow or skill is added (Section 9 needs updating)
- Configuration values change (Quick Reference table goes stale)
- Roughly every 4-6 sessions, even if nothing dramatic changed -- small drift accumulates
Ask the agent:
"Review the project-context skill against the current state of the codebase. Propose updates for my approval before writing anything."
The agent should then work through the following checklist and propose changes section by section. The developer approves each change before it is written.
| # | Check | Section(s) Affected |
|---|---|---|
| 1 | File tree accuracy. Are all directories and key files still correctly listed? Have any been added, renamed, or removed? | Section 2 |
| 2 | Architecture changes. Has the module pattern, build pipeline, or dependency list changed? Any new external libraries? | Section 3 |
| 3 | New systems. Were any new systems introduced that deserve a deep-dive subsection? | Section 4 |
| 4 | Changed systems. Have any documented systems gained new methods, properties, or changed behaviour? | Section 4 |
| 5 | New coding standards. Were any new conventions established during recent work that should be codified? | Section 5 |
| 6 | New patterns. Were any new recurring patterns introduced (e.g. a new composition pattern, a new error handling approach)? | Section 6 |
| 7 | Test changes. Have test files, helpers, or running instructions changed? | Section 7 |
| 8 | Quick Reference drift. Have any key values, thresholds, or config locations changed? Any new ones worth adding? | Section 10 |
| 9 | New common tasks. Did the recent work establish a repeatable recipe that should be documented for next time? | Section 11 |
| 10 | New gotchas. Did any non-obvious behaviours, traps, or "I wasted time on this" moments surface? | Section 12 |
Once updates are approved and written, add an entry to the maintenance log below. This creates a lightweight history of how the skill has evolved, and helps you see at a glance when it was last reviewed.
| Date | Trigger | Changes Made |
|---|---|---|
| [YYYY-MM-DD] | [Initial creation] | [Populated all sections from scratch] |