{"id":"3a3ffebf-26f5-4d18-9bcb-e910fee4940a","shortId":"PHTbDz","kind":"skill","title":"Agent Context File Writer","tagline":"Writes a high-quality CLAUDE.md, .cursorrules, or .windsurfrules file that gives a coding agent the right project context, conventions, and constraints to work effectively.","description":"# Agent Context File Writer\n\n## What this skill does\n\nThis skill writes the context file that tells a coding agent how to work in your project — `CLAUDE.md` for Claude Code, `.cursorrules` for Cursor, `.windsurfrules` for Windsurf, or `.codebuddy` for others. A well-written context file is the highest-leverage thing you can do to improve agent quality. It prevents the agent from making wrong assumptions, using the wrong patterns, or re-explaining things you've already decided.\n\n## How to use\n\n### Claude Code / Cline\n\nCopy this file to `.agents/skills/agent-context-file-writer/SKILL.md` in your project root.\n\nThen ask:\n- *\"Use the Agent Context File Writer to create a CLAUDE.md for this project.\"*\n- *\"Write a .cursorrules file for our Next.js + Prisma + tRPC codebase.\"*\n\nProvide:\n- Tech stack (framework, language, key libraries)\n- Project type (API, frontend app, CLI tool, etc.)\n- Any strong conventions (naming, file structure, testing approach)\n- Anything agents have done wrong in the past\n\n### Cursor / Codex\n\nDescribe your project and provide any existing README or architecture notes alongside these instructions.\n\n## The Prompt / Instructions for the Agent\n\nWhen asked to write an agent context file, explore the codebase first, then produce the file with all of these sections:\n\n### Step 1 — Explore the codebase\n\nBefore writing, read:\n- `package.json` / `pyproject.toml` / `go.mod` — to identify the stack\n- Directory structure (top 2 levels) — to understand layout\n- One or two key files — to understand coding style\n- Existing README — for project purpose\n\n### Step 2 — Produce the context file\n\nThe file must contain all of these sections:\n\n---\n\n#### Section 1: Project overview (3–5 sentences)\nWhat the project does, who uses it, and what matters most about it. Not a marketing pitch — a technical brief for an agent.\n\n```markdown\n## Project Overview\nSimplyUtils is a multi-tool web app with 72+ browser-based utilities built on React + Express + PostgreSQL.\nMost tools run entirely client-side for privacy. The project is deployed on Vercel (frontend) + EC2 (API).\n```\n\n#### Section 2: Stack and key dependencies\nList the exact libraries and versions an agent needs to know to write correct code.\n\n```markdown\n## Tech Stack\n- Frontend: React 18, TypeScript, Vite, TailwindCSS, shadcn/ui, Wouter (routing)\n- Backend: Express, TypeScript, Drizzle ORM, PostgreSQL\n- Testing: Vitest, Playwright\n- Build: Vite (client), esbuild (server)\n```\n\n#### Section 3: Project structure\nMap the key directories so the agent doesn't need to explore.\n\n```markdown\n## Project Structure\n- `client/src/tools/` — tool components (one file per tool)\n- `client/src/components/seo/` — SEO content per tool (required)\n- `server/routes.ts` — all API endpoints\n- `shared/schema.ts` — database schema (Drizzle)\n- `client/src/data/` — static data files\n```\n\n#### Section 4: Conventions and rules (most important section)\nExplicit rules the agent must follow. Be specific — vague rules get ignored.\n\n```markdown\n## Rules\n1. Every new tool needs a matching SEO component in `client/src/components/seo/`\n2. Use shadcn/ui components — never write raw HTML form elements\n3. Database queries go through `storage` (server/storage.ts) — never query directly in routes\n4. All client-side processing preferred — no server round-trip unless necessary\n5. Run `npm run check` before finishing any task — fix all type errors\n```\n\n#### Section 5: Patterns with examples\nShow the agent how things are done in this project, not how they're done in general.\n\n```markdown\n## Patterns\n\n### Adding a new tool\n1. Create `client/src/tools/MyTool.tsx`\n2. Add to `client/src/data/tools.ts`\n3. Map in `client/src/pages/ToolPage.tsx`\n4. Create `client/src/components/seo/MyToolSeoContent.tsx`\n\n### API endpoint pattern\n```ts\napp.post(\"/api/my-endpoint\", requireTurnstile, async (req, res) => {\n  const { input } = req.body;\n  // validate input\n  res.json({ result });\n});\n```\n```\n\n#### Section 6: What NOT to do\nList anti-patterns the agent should avoid. Include ones it has gotten wrong before.\n\n```markdown\n## Avoid\n- Never use `any` type in TypeScript — use proper types or `unknown`\n- Never add console.log statements in production code\n- Never commit .env files or secrets\n- Don't create new utility files for one-off functions — inline them\n- Don't add dependencies without checking if something already in the project does the job\n```\n\n#### Section 7: Commands\nThe commands the agent needs to run.\n\n```markdown\n## Commands\n- `npm run dev` — start dev server\n- `npm run build` — production build\n- `npm run check` — TypeScript type check (run before finishing)\n- `npm run db:push` — push schema changes\n```\n\n### Rules for writing a good context file\n\n- **Be specific, not general.** \"Use TypeScript properly\" is useless. \"Never use `any` — use `unknown` and narrow it\" is actionable.\n- **Include negative examples.** What has gone wrong? What should the agent never do?\n- **Keep it under 200 lines.** Longer files dilute attention. If it's too long, the agent will skim it.\n- **Update it when conventions change.** A stale context file is worse than none.\n- **Don't duplicate the README.** The context file is for agent behavior, not project documentation.\n\n## Example\n\n**Input:**\n> \"Write a CLAUDE.md for a FastAPI + SQLAlchemy + React project. We use Pydantic v2, Alembic for migrations, and pytest. The agent previously kept writing raw SQL instead of using SQLAlchemy.\"\n\n**Output:**\n```markdown\n# CLAUDE.md\n\n## Project Overview\nPython REST API (FastAPI) with a React frontend. SQLAlchemy is the ORM — never write raw SQL.\nPydantic v2 handles all request/response validation.\n\n## Stack\n- Backend: Python 3.12, FastAPI, SQLAlchemy 2.0, Pydantic v2, Alembic\n- Frontend: React 18, TypeScript, Vite\n- Testing: pytest, pytest-asyncio\n\n## Rules\n1. **Never write raw SQL** — always use SQLAlchemy ORM (select, insert, update via session)\n2. All request/response models are Pydantic BaseModel subclasses in `app/schemas/`\n3. Database models are in `app/models/` — one file per domain entity\n4. All DB operations go through the session dependency: `db: Session = Depends(get_db)`\n5. Run `pytest` before finishing — all tests must pass\n\n## Migrations\n- Add new columns in `app/models/`, then run `alembic revision --autogenerate -m \"description\"`\n- Never edit the database directly\n\n## Commands\n- `uvicorn app.main:app --reload` — dev server\n- `pytest` — run tests\n- `alembic upgrade head` — apply migrations\n```","tags":["agent","context","file","writer","openagentskills","notysoty","agent-skills","claude","claude-code","claude-skills","cline","cursor"],"capabilities":["skill","source-notysoty","skill-agent-context-file-writer","topic-agent-skills","topic-claude","topic-claude-code","topic-claude-skills","topic-cline","topic-cursor","topic-llm","topic-llm-skills","topic-skills"],"categories":["openagentskills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/Notysoty/openagentskills/agent-context-file-writer","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add Notysoty/openagentskills","source_repo":"https://github.com/Notysoty/openagentskills","install_from":"skills.sh"}},"qualityScore":"0.454","qualityRationale":"deterministic score 0.45 from registry signals: · indexed on github topic:agent-skills · 8 github stars · SKILL.md body (6,480 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-05-18T19:13:19.817Z","embedding":null,"createdAt":"2026-05-18T13:20:39.971Z","updatedAt":"2026-05-18T19:13:19.817Z","lastSeenAt":"2026-05-18T19:13:19.817Z","tsv":"'/api/my-endpoint':564 '1':224,275,457,545,855 '18':370,846 '2':241,261,345,468,548,869 '2.0':840 '200':732 '3':278,392,478,552,879 '3.12':837 '4':436,490,556,890 '5':279,504,518,904 '6':577 '7':652 '72':316 'action':715 'ad':541 'add':549,611,638,914 'agent':1,19,30,48,86,91,128,173,201,207,303,357,401,446,524,587,657,726,744,771,797 'agents/skills/agent-context-file-writer/skill.md':119 'alemb':791,843,921,941 'alongsid':193 'alreadi':107,644 'alway':860 'anti':584 'anti-pattern':583 'anyth':172 'api':158,343,425,559,814 'app':160,314,934 'app.main':933 'app.post':563 'app/models':884,918 'app/schemas':878 'appli':944 'approach':171 'architectur':191 'ask':125,203 'assumpt':95 'async':566 'asyncio':853 'attent':737 'autogener':923 'avoid':589,598 'backend':377,835 'base':319 'basemodel':875 'behavior':772 'brief':300 'browser':318 'browser-bas':317 'build':386,671,673 'built':321 'chang':689,752 'check':508,641,676,679 'claud':57,112 'claude.md':10,55,135,780,809 'cli':161 'client':331,388,493 'client-sid':330,492 'client/src/components/seo':417,467 'client/src/components/seo/mytoolseocontent.tsx':558 'client/src/data':431 'client/src/data/tools.ts':551 'client/src/pages/toolpage.tsx':555 'client/src/tools':410 'client/src/tools/mytool.tsx':547 'cline':114 'code':18,47,58,113,253,364,616 'codebas':148,212,227 'codebuddi':66 'codex':181 'column':916 'command':653,655,662,931 'commit':618 'compon':412,465,471 'console.log':612 'const':569 'constraint':26 'contain':269 'content':419 'context':2,23,31,42,73,129,208,264,695,755,767 'convent':24,166,437,751 'copi':115 'correct':363 'creat':133,546,557,625 'cursor':61,180 'cursorrul':11,59,141 'data':433 'databas':428,479,880,929 'db':685,892,899,903 'decid':108 'depend':349,639,898,901 'deploy':338 'describ':182 'descript':925 'dev':665,667,936 'dilut':736 'direct':487,930 'directori':238,398 'document':775 'doesn':402 'domain':888 'done':175,528,536 'drizzl':380,430 'duplic':763 'ec2':342 'edit':927 'effect':29 'element':477 'endpoint':426,560 'entir':329 'entiti':889 'env':619 'error':516 'esbuild':389 'etc':163 'everi':458 'exact':352 'exampl':521,718,776 'exist':188,255 'explain':103 'explicit':443 'explor':210,225,406 'express':324,378 'fastapi':783,815,838 'file':3,14,32,43,74,117,130,142,168,209,217,250,265,267,414,434,620,628,696,735,756,768,886 'finish':510,682,908 'first':213 'fix':513 'follow':448 'form':476 'framework':152 'frontend':159,341,368,819,844 'function':633 'general':538,700 'get':453,902 'give':16 'go':481,894 'go.mod':233 'gone':721 'good':694 'gotten':594 'handl':830 'head':943 'high':8 'high-qual':7 'highest':78 'highest-leverag':77 'html':475 'identifi':235 'ignor':454 'import':441 'improv':85 'includ':590,716 'inlin':634 'input':570,573,777 'insert':865 'instead':803 'instruct':195,198 'job':650 'keep':729 'kept':799 'key':154,249,348,397 'know':360 'languag':153 'layout':245 'level':242 'leverag':79 'librari':155,353 'line':733 'list':350,582 'long':742 'longer':734 'm':924 'make':93 'map':395,553 'markdown':304,365,407,455,539,597,661,808 'market':296 'match':463 'matter':290 'migrat':793,913,945 'model':872,881 'multi':311 'multi-tool':310 'must':268,447,911 'name':167 'narrow':712 'necessari':503 'need':358,404,461,658 'negat':717 'never':472,485,599,610,617,706,727,824,856,926 'new':459,543,626,915 'next.js':145 'none':760 'note':192 'npm':506,663,669,674,683 'one':246,413,591,631,885 'one-off':630 'oper':893 'orm':381,823,863 'other':68 'output':807 'overview':277,306,811 'package.json':231 'pass':912 'past':179 'pattern':99,519,540,561,585 'per':415,420,887 'pitch':297 'playwright':385 'postgresql':325,382 'prefer':496 'prevent':89 'previous':798 'prisma':146 'privaci':334 'process':495 'produc':215,262 'product':615,672 'project':22,54,122,138,156,184,258,276,283,305,336,393,408,531,647,774,786,810 'prompt':197 'proper':606,703 'provid':149,186 'purpos':259 'push':686,687 'pydant':789,828,841,874 'pyproject.toml':232 'pytest':795,850,852,906,938 'pytest-asyncio':851 'python':812,836 'qualiti':9,87 'queri':480,486 'raw':474,801,826,858 're':102,535 're-explain':101 'react':323,369,785,818,845 'read':230 'readm':189,256,765 'reload':935 'req':567 'req.body':571 'request/response':832,871 'requir':422 'requireturnstil':565 'res':568 'res.json':574 'rest':813 'result':575 'revis':922 'right':21 'root':123 'round':500 'round-trip':499 'rout':376,489 'rule':439,444,452,456,690,854 'run':328,505,507,660,664,670,675,680,684,905,920,939 'schema':429,688 'secret':622 'section':222,273,274,344,391,435,442,517,576,651 'select':864 'sentenc':280 'seo':418,464 'server':390,498,668,937 'server/routes.ts':423 'server/storage.ts':484 'session':868,897,900 'shadcn/ui':374,470 'shared/schema.ts':427 'show':522 'side':332,494 'simplyutil':307 'skill':36,39 'skill-agent-context-file-writer' 'skim':746 'someth':643 'source-notysoty' 'specif':450,698 'sql':802,827,859 'sqlalchemi':784,806,820,839,862 'stack':151,237,346,367,834 'stale':754 'start':666 'statement':613 'static':432 'step':223,260 'storag':483 'strong':165 'structur':169,239,394,409 'style':254 'subclass':876 'tailwindcss':373 'task':512 'tech':150,366 'technic':299 'tell':45 'test':170,383,849,910,940 'thing':80,104,526 'tool':162,312,327,411,416,421,460,544 'top':240 'topic-agent-skills' 'topic-claude' 'topic-claude-code' 'topic-claude-skills' 'topic-cline' 'topic-cursor' 'topic-llm' 'topic-llm-skills' 'topic-skills' 'trip':501 'trpc':147 'ts':562 'two':248 'type':157,515,602,607,678 'typescript':371,379,604,677,702,847 'understand':244,252 'unknown':609,710 'unless':502 'updat':748,866 'upgrad':942 'use':96,111,126,286,469,600,605,701,707,709,788,805,861 'useless':705 'util':320,627 'uvicorn':932 'v2':790,829,842 'vagu':451 'valid':572,833 've':106 'vercel':340 'version':355 'via':867 'vite':372,387,848 'vitest':384 'web':313 'well':71 'well-written':70 'windsurf':64 'windsurfrul':13,62 'without':640 'work':28,51 'wors':758 'wouter':375 'write':5,40,139,205,229,362,473,692,778,800,825,857 'writer':4,33,131 'written':72 'wrong':94,98,176,595,722","prices":[{"id":"02786927-2f3d-4e19-8ff3-132b8d3160e4","listingId":"3a3ffebf-26f5-4d18-9bcb-e910fee4940a","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"Notysoty","category":"openagentskills","install_from":"skills.sh"},"createdAt":"2026-05-18T13:20:39.971Z"}],"sources":[{"listingId":"3a3ffebf-26f5-4d18-9bcb-e910fee4940a","source":"github","sourceId":"Notysoty/openagentskills/agent-context-file-writer","sourceUrl":"https://github.com/Notysoty/openagentskills/tree/main/skills/agent-context-file-writer","isPrimary":false,"firstSeenAt":"2026-05-18T13:20:39.971Z","lastSeenAt":"2026-05-18T19:13:19.817Z"}],"details":{"listingId":"3a3ffebf-26f5-4d18-9bcb-e910fee4940a","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"Notysoty","slug":"agent-context-file-writer","github":{"repo":"Notysoty/openagentskills","stars":8,"topics":["agent-skills","claude","claude-code","claude-skills","cline","cursor","llm","llm-skills","skills"],"license":"mit","html_url":"https://github.com/Notysoty/openagentskills","pushed_at":"2026-03-28T06:50:19Z","description":"A  community-driven library of reusable AI agent skills for Claude Code, Cursor, Codex, Cline, and more.","skill_md_sha":"0d1efd5bd2de36f38611b5b5b4f74a16df05ce41","skill_md_path":"skills/agent-context-file-writer/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/Notysoty/openagentskills/tree/main/skills/agent-context-file-writer"},"layout":"multi","source":"github","category":"openagentskills","frontmatter":{"name":"Agent Context File Writer","description":"Writes a high-quality CLAUDE.md, .cursorrules, or .windsurfrules file that gives a coding agent the right project context, conventions, and constraints to work effectively."},"skills_sh_url":"https://skills.sh/Notysoty/openagentskills/agent-context-file-writer"},"updatedAt":"2026-05-18T19:13:19.817Z"}}