{"id":"98699cbd-3ec0-481e-9506-8172951029b7","shortId":"8gdBjv","kind":"skill","title":"source-driven-development","tagline":"Grounds every implementation decision in official documentation. Use when you want authoritative, source-cited code free from outdated patterns. Use when building with any framework or library where correctness matters.","description":"# Source-Driven Development\n\n## Overview\n\nEvery framework-specific code decision must be backed by official documentation. Don't implement from memory — verify, cite, and let the user see your sources. Training data goes stale, APIs get deprecated, best practices evolve. This skill ensures the user gets code they can trust because every pattern traces back to an authoritative source they can check.\n\n## When to Use\n\n- The user wants code that follows current best practices for a given framework\n- Building boilerplate, starter code, or patterns that will be copied across a project\n- The user explicitly asks for documented, verified, or \"correct\" implementation\n- Implementing features where the framework's recommended approach matters (forms, routing, data fetching, state management, auth)\n- Reviewing or improving code that uses framework-specific patterns\n- Any time you are about to write framework-specific code from memory\n\n**When NOT to use:**\n\n- Correctness does not depend on a specific version (renaming variables, fixing typos, moving files)\n- Pure logic that works the same across all versions (loops, conditionals, data structures)\n- The user explicitly wants speed over verification (\"just do it quickly\")\n\n## The Process\n\n```\nDETECT ──→ FETCH ──→ IMPLEMENT ──→ CITE\n  │          │           │            │\n  ▼          ▼           ▼            ▼\n What       Get the    Follow the   Show your\n stack?     relevant   documented   sources\n            docs       patterns\n```\n\n### Step 1: Detect Stack and Versions\n\nRead the project's dependency file to identify exact versions:\n\n```\npackage.json    → Node/React/Vue/Angular/Svelte\ncomposer.json   → PHP/Symfony/Laravel\nrequirements.txt / pyproject.toml → Python/Django/Flask\ngo.mod          → Go\nCargo.toml      → Rust\nGemfile         → Ruby/Rails\n```\n\nState what you found explicitly:\n\n```\nSTACK DETECTED:\n- React 19.1.0 (from package.json)\n- Vite 6.2.0\n- Tailwind CSS 4.0.3\n→ Fetching official docs for the relevant patterns.\n```\n\nIf versions are missing or ambiguous, **ask the user**. Don't guess — the version determines which patterns are correct.\n\n### Step 2: Fetch Official Documentation\n\nFetch the specific documentation page for the feature you're implementing. Not the homepage, not the full docs — the relevant page.\n\n**Source hierarchy (in order of authority):**\n\n| Priority | Source | Example |\n|----------|--------|---------|\n| 1 | Official documentation | react.dev, docs.djangoproject.com, symfony.com/doc |\n| 2 | Official blog / changelog | react.dev/blog, nextjs.org/blog |\n| 3 | Web standards references | MDN, web.dev, html.spec.whatwg.org |\n| 4 | Browser/runtime compatibility | caniuse.com, node.green |\n\n**Not authoritative — never cite as primary sources:**\n\n- Stack Overflow answers\n- Blog posts or tutorials (even popular ones)\n- AI-generated documentation or summaries\n- Your own training data (that is the whole point — verify it)\n\n**Be precise with what you fetch:**\n\n```\nBAD:  Fetch the React homepage\nGOOD: Fetch react.dev/reference/react/useActionState\n\nBAD:  Search \"django authentication best practices\"\nGOOD: Fetch docs.djangoproject.com/en/6.0/topics/auth/\n```\n\nAfter fetching, extract the key patterns and note any deprecation warnings or migration guidance.\n\nWhen official sources conflict with each other (e.g. a migration guide contradicts the API reference), surface the discrepancy to the user and verify which pattern actually works against the detected version.\n\n### Step 3: Implement Following Documented Patterns\n\nWrite code that matches what the documentation shows:\n\n- Use the API signatures from the docs, not from memory\n- If the docs show a new way to do something, use the new way\n- If the docs deprecate a pattern, don't use the deprecated version\n- If the docs don't cover something, flag it as unverified\n\n**When docs conflict with existing project code:**\n\n```\nCONFLICT DETECTED:\nThe existing codebase uses useState for form loading state,\nbut React 19 docs recommend useActionState for this pattern.\n(Source: react.dev/reference/react/useActionState)\n\nOptions:\nA) Use the modern pattern (useActionState) — consistent with current docs\nB) Match existing code (useState) — consistent with codebase\n→ Which approach do you prefer?\n```\n\nSurface the conflict. Don't silently pick one.\n\n### Step 4: Cite Your Sources\n\nEvery framework-specific pattern gets a citation. The user must be able to verify every decision.\n\n**In code comments:**\n\n```typescript\n// React 19 form handling with useActionState\n// Source: https://react.dev/reference/react/useActionState#usage\nconst [state, formAction, isPending] = useActionState(submitOrder, initialState);\n```\n\n**In conversation:**\n\n```\nI'm using useActionState instead of manual useState for the\nform submission state. React 19 replaced the manual\nisPending/setIsPending pattern with this hook.\n\nSource: https://react.dev/blog/2024/12/05/react-19#actions\n\"useTransition now supports async functions [...] to handle\npending states automatically\"\n```\n\n**Citation rules:**\n\n- Full URLs, not shortened\n- Prefer deep links with anchors where possible (e.g. `/useActionState#usage` over `/useActionState`) — anchors survive doc restructuring better than top-level pages\n- Quote the relevant passage when it supports a non-obvious decision\n- Include browser/runtime support data when recommending platform features\n- If you cannot find documentation for a pattern, say so explicitly:\n\n```\nUNVERIFIED: I could not find official documentation for this\npattern. This is based on training data and may be outdated.\nVerify before using in production.\n```\n\nHonesty about what you couldn't verify is more valuable than false confidence.\n\n## Common Rationalizations\n\n| Rationalization | Reality |\n|---|---|\n| \"I'm confident about this API\" | Confidence is not evidence. Training data contains outdated patterns that look correct but break against current versions. Verify. |\n| \"Fetching docs wastes tokens\" | Hallucinating an API wastes more. The user debugs for an hour, then discovers the function signature changed. One fetch prevents hours of rework. |\n| \"The docs won't have what I need\" | If the docs don't cover it, that's valuable information — the pattern may not be officially recommended. |\n| \"I'll just mention it might be outdated\" | A disclaimer doesn't help. Either verify and cite, or clearly flag it as unverified. Hedging is the worst option. |\n| \"This is a simple task, no need to check\" | Simple tasks with wrong patterns become templates. The user copies your deprecated form handler into ten components before discovering the modern approach exists. |\n\n## Red Flags\n\n- Writing framework-specific code without checking the docs for that version\n- Using \"I believe\" or \"I think\" about an API instead of citing the source\n- Implementing a pattern without knowing which version it applies to\n- Citing Stack Overflow or blog posts instead of official documentation\n- Using deprecated APIs because they appear in training data\n- Not reading `package.json` / dependency files before implementing\n- Delivering code without source citations for framework-specific decisions\n- Fetching an entire docs site when only one page is relevant\n\n## Verification\n\nAfter implementing with source-driven development:\n\n- [ ] Framework and library versions were identified from the dependency file\n- [ ] Official documentation was fetched for framework-specific patterns\n- [ ] All sources are official documentation, not blog posts or training data\n- [ ] Code follows the patterns shown in the current version's documentation\n- [ ] Non-trivial decisions include source citations with full URLs\n- [ ] No deprecated APIs are used (checked against migration guides)\n- [ ] Conflicts between docs and existing code were surfaced to the user\n- [ ] Anything that could not be verified is explicitly flagged as unverified","tags":["source","driven","development","agent","skills","addyosmani","agent-skills","antigravity","antigravity-ide","claude-code","cursor"],"capabilities":["skill","source-addyosmani","skill-source-driven-development","topic-agent-skills","topic-antigravity","topic-antigravity-ide","topic-claude-code","topic-cursor","topic-skills"],"categories":["agent-skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/addyosmani/agent-skills/source-driven-development","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add addyosmani/agent-skills","source_repo":"https://github.com/addyosmani/agent-skills","install_from":"skills.sh"}},"qualityScore":"0.700","qualityRationale":"deterministic score 0.70 from registry signals: · indexed on github topic:agent-skills · 20334 github stars · SKILL.md body (7,861 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-04-22T06:52:42.737Z","embedding":null,"createdAt":"2026-04-18T20:39:08.673Z","updatedAt":"2026-04-22T06:52:42.737Z","lastSeenAt":"2026-04-22T06:52:42.737Z","tsv":"'/blog':361 '/blog,':358 '/blog/2024/12/05/react-19#actions':675 '/doc':351 '/en/6.0/topics/auth/':434 '/reference/react/useactionstate':423 '/reference/react/useactionstate#usage':639 '/reference/react/useactionstate)':571 '/useactionstate':700,703 '1':239,344 '19':561,631,663 '19.1.0':275 '2':310,352 '3':362,481 '4':369,605 '4.0.3':282 '6.2.0':279 'abl':621 'across':125,201 'actual':474 'ai':392 'ai-gener':391 'ambigu':295 'anchor':696,704 'answer':383 'anyth':1088 'api':71,462,496,792,817,946,974,1070 'appear':977 'appli':960 'approach':145,592,922 'ask':131,296 'async':679 'auth':153 'authent':427 'author':340 'authorit':16,94,375 'automat':685 'b':583 'back':49,91 'bad':414,424 'base':757 'becom':906 'believ':940 'best':74,109,428 'better':708 'blog':354,384,966,1042 'boilerpl':116 'break':806 'browser/runtime':370,727 'build':27,115 'caniuse.com':372 'cannot':736 'cargo.toml':263 'chang':831 'changelog':355 'check':98,900,932,1073 'citat':616,686,992,1064 'cite':19,59,224,377,606,880,949,962 'clear':882 'code':20,45,83,105,118,157,174,487,547,586,627,930,989,1047,1082 'codebas':552,590 'comment':628 'common':783 'compat':371 'compon':917 'composer.json':256 'condit':205 'confid':782,789,793 'conflict':452,543,548,598,1077 'consist':579,588 'const':640 'contain':799 'contradict':460 'convers':648 'copi':124,910 'correct':34,136,181,308,804 'could':747,1090 'couldn':774 'cover':535,851 'css':281 'current':108,581,808,1054 'data':68,149,206,400,729,760,798,980,1046 'debug':822 'decis':8,46,625,725,997,1061 'deep':693 'deliv':988 'depend':184,248,984,1025 'deprec':73,444,521,528,912,973,1069 'detect':221,240,273,478,549 'determin':304 'develop':4,39,1016 'disclaim':873 'discov':827,919 'discrep':466 'django':426 'doc':236,285,331,500,506,520,532,542,562,582,706,812,839,848,934,1001,1079 'docs.djangoproject.com':348,433 'docs.djangoproject.com/en/6.0/topics/auth/':432 'document':11,52,133,234,313,317,346,394,484,492,738,751,971,1028,1040,1057 'doesn':874 'driven':3,38,1015 'e.g':456,699 'either':877 'ensur':79 'entir':1000 'even':388 'everi':6,41,88,609,624 'evid':796 'evolv':76 'exact':252 'exampl':343 'exist':545,551,585,923,1081 'explicit':130,210,271,744,1095 'extract':437 'fals':781 'featur':139,321,733 'fetch':150,222,283,311,314,413,415,420,431,436,811,833,998,1030 'file':194,249,985,1026 'find':737,749 'fix':191 'flag':537,883,925,1096 'follow':107,228,483,1048 'form':147,556,632,659,913 'formact':642 'found':270 'framework':30,43,114,142,161,172,611,928,995,1017,1033 'framework-specif':42,160,171,610,927,994,1032 'free':21 'full':330,688,1066 'function':680,829 'gemfil':265 'generat':393 'get':72,82,226,614 'given':113 'go':262 'go.mod':261 'goe':69 'good':419,430 'ground':5 'guess':301 'guid':459,1076 'guidanc':448 'hallucin':815 'handl':633,682 'handler':914 'hedg':887 'help':876 'hierarchi':336 'homepag':327,418 'honesti':770 'hook':671 'hour':825,835 'html.spec.whatwg.org':368 'identifi':251,1022 'implement':7,55,137,138,223,324,482,952,987,1011 'improv':156 'includ':726,1062 'inform':856 'initialst':646 'instead':653,947,968 'ispend':643 'ispending/setispending':667 'key':439 'know':956 'let':61 'level':712 'librari':32,1019 'link':694 'll':865 'load':557 'logic':196 'look':803 'loop':204 'm':650,788 'manag':152 'manual':655,666 'match':489,584 'matter':35,146 'may':762,859 'mdn':366 'memori':57,176,503 'mention':867 'might':869 'migrat':447,458,1075 'miss':293 'modern':576,921 'move':193 'must':47,619 'need':845,898 'never':376 'new':509,516 'nextjs.org':360 'nextjs.org/blog':359 'node.green':373 'node/react/vue/angular/svelte':255 'non':723,1059 'non-obvi':722 'non-trivi':1058 'note':442 'obvious':724 'offici':10,51,284,312,345,353,450,750,862,970,1027,1039 'one':390,603,832,1005 'option':572,891 'order':338 'outdat':23,764,800,871 'overflow':382,964 'overview':40 'package.json':254,277,983 'page':318,334,713,1006 'passag':717 'pattern':24,89,120,163,237,289,306,440,473,485,523,567,577,613,668,741,754,801,858,905,954,1035,1050 'pend':683 'php/symfony/laravel':257 'pick':602 'platform':732 'point':405 'popular':389 'possibl':698 'post':385,967,1043 'practic':75,110,429 'precis':409 'prefer':595,692 'prevent':834 'primari':379 'prioriti':341 'process':220 'product':769 'project':127,246,546 'pure':195 'pyproject.toml':259 'python/django/flask':260 'quick':218 'quot':714 'ration':784,785 're':323 'react':274,417,560,630,662 'react.dev':347,357,422,570,638,674 'react.dev/blog,':356 'react.dev/blog/2024/12/05/react-19#actions':673 'react.dev/reference/react/useactionstate':421 'react.dev/reference/react/useactionstate#usage':637 'react.dev/reference/react/useactionstate)':569 'read':244,982 'realiti':786 'recommend':144,563,731,863 'red':924 'refer':365,463 'relev':233,288,333,716,1008 'renam':189 'replac':664 'requirements.txt':258 'restructur':707 'review':154 'rework':837 'rout':148 'ruby/rails':266 'rule':687 'rust':264 'say':742 'search':425 'see':64 'shorten':691 'show':230,493,507 'shown':1051 'signatur':497,830 'silent':601 'simpl':895,901 'site':1002 'skill':78 'skill-source-driven-development' 'someth':513,536 'sourc':2,18,37,66,95,235,335,342,380,451,568,608,636,672,951,991,1014,1037,1063 'source-addyosmani' 'source-cit':17 'source-driven':36,1013 'source-driven-develop':1 'specif':44,162,173,187,316,612,929,996,1034 'speed':212 'stack':232,241,272,381,963 'stale':70 'standard':364 'starter':117 'state':151,267,558,641,661,684 'step':238,309,480,604 'structur':207 'submiss':660 'submitord':645 'summari':396 'support':678,720,728 'surfac':464,596,1084 'surviv':705 'symfony.com':350 'symfony.com/doc':349 'tailwind':280 'task':896,902 'templat':907 'ten':916 'think':943 'time':165 'token':814 'top':711 'top-level':710 'topic-agent-skills' 'topic-antigravity' 'topic-antigravity-ide' 'topic-claude-code' 'topic-cursor' 'topic-skills' 'trace':90 'train':67,399,759,797,979,1045 'trivial':1060 'trust':86 'tutori':387 'typescript':629 'typo':192 'unverifi':540,745,886,1098 'url':689,1067 'usag':701 'use':12,25,101,159,180,494,514,526,553,574,651,767,938,972,1072 'useactionst':564,578,635,644,652 'user':63,81,103,129,209,298,469,618,821,909,1087 'usest':554,587,656 'usetransit':676 'valuabl':779,855 'variabl':190 'verif':214,1009 'verifi':58,134,406,471,623,765,776,810,878,1093 'version':188,203,243,253,291,303,479,529,809,937,958,1020,1055 'vite':278 'want':15,104,211 'warn':445 'wast':813,818 'way':510,517 'web':363 'web.dev':367 'whole':404 'without':931,955,990 'won':840 'work':198,475 'worst':890 'write':170,486,926 'wrong':904","prices":[{"id":"37d8aa5d-dc9c-4b9d-9386-ba63d7ef7da8","listingId":"98699cbd-3ec0-481e-9506-8172951029b7","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"addyosmani","category":"agent-skills","install_from":"skills.sh"},"createdAt":"2026-04-18T20:39:08.673Z"}],"sources":[{"listingId":"98699cbd-3ec0-481e-9506-8172951029b7","source":"github","sourceId":"addyosmani/agent-skills/source-driven-development","sourceUrl":"https://github.com/addyosmani/agent-skills/tree/main/skills/source-driven-development","isPrimary":false,"firstSeenAt":"2026-04-18T21:53:05.210Z","lastSeenAt":"2026-04-22T06:52:42.737Z"},{"listingId":"98699cbd-3ec0-481e-9506-8172951029b7","source":"skills_sh","sourceId":"addyosmani/agent-skills/source-driven-development","sourceUrl":"https://skills.sh/addyosmani/agent-skills/source-driven-development","isPrimary":true,"firstSeenAt":"2026-04-18T20:39:08.673Z","lastSeenAt":"2026-04-22T06:40:41.684Z"}],"details":{"listingId":"98699cbd-3ec0-481e-9506-8172951029b7","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"addyosmani","slug":"source-driven-development","github":{"repo":"addyosmani/agent-skills","stars":20334,"topics":["agent-skills","antigravity","antigravity-ide","claude-code","cursor","skills"],"license":"mit","html_url":"https://github.com/addyosmani/agent-skills","pushed_at":"2026-04-21T06:34:32Z","description":"Production-grade engineering skills for AI coding agents.","skill_md_sha":"9ef02877e446bd2d31862006ef4e3a79d5c38b9a","skill_md_path":"skills/source-driven-development/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/addyosmani/agent-skills/tree/main/skills/source-driven-development"},"layout":"multi","source":"github","category":"agent-skills","frontmatter":{"name":"source-driven-development","description":"Grounds every implementation decision in official documentation. Use when you want authoritative, source-cited code free from outdated patterns. Use when building with any framework or library where correctness matters."},"skills_sh_url":"https://skills.sh/addyosmani/agent-skills/source-driven-development"},"updatedAt":"2026-04-22T06:52:42.737Z"}}