{"id":"add47959-b284-4550-8fb0-5d66da08ac0a","shortId":"GdKZxq","kind":"skill","title":"specstory-yak","tagline":"Analyze your SpecStory AI coding sessions in .specstory/history for yak shaving - when your initial goal got derailed into rabbit holes. Run when user says \"analyze my yak shaving\", \"check for rabbit holes\", \"how distracted was I\", or \"yak shave score\".","description":"# Specstory Yak Shave Analyzer\n\nAnalyzes your `.specstory/history` to detect when coding sessions drifted off track from their original goal. Produces a \"yak shave score\" for each session.\n\n## How It Works\n\n1. **Parses** specstory history files from a date range (or all recent sessions)\n2. **Extracts** the initial user intent from the first message\n3. **Tracks** domain shifts: file references, tool call patterns, goal changes\n4. **Scores** each session from 0 (laser focused) to 100 (maximum yak shave)\n5. **Summarizes** your worst offenders and patterns\n\n## What Is Yak Shaving?\n\n> \"I need to deploy my app, but first I need to fix CI, but first I need to update Node, but first I need to fix my shell config...\"\n\nYak shaving is when you start with Goal A but end up deep in unrelated Task Z. This skill detects that pattern in your AI coding sessions.\n\n## Usage\n\n### Slash Command\n\nWhen invoked via `/specstory-yak`, interpret the user's natural language:\n\n| User says | Script args |\n|-----------|-------------|\n| `/specstory-yak` | `--days 7` (default) |\n| `/specstory-yak last 30 days` | `--days 30` |\n| `/specstory-yak this week` | `--days 7` |\n| `/specstory-yak top 10` | `--top 10` |\n| `/specstory-yak january` | `--from 2026-01-01 --to 2026-01-31` |\n| `/specstory-yak from jan 15 to jan 20` | `--from 2026-01-15 --to 2026-01-20` |\n| `/specstory-yak by modification time` | `--by-mtime` |\n| `/specstory-yak last 14 days as json` | `--days 14 --json` |\n| `/specstory-yak save to yak-report.md` | `-o yak-report.md` |\n| `/specstory-yak last 90 days output to report` | `--days 90 -o report.md` |\n\n### Direct Script Usage\n\n```bash\npython /path/to/skills/specstory-yak/scripts/analyze.py [options]\n```\n\n**Arguments:**\n- `--days N` - Analyze last N days (default: 7)\n- `--from DATE` - Start date (YYYY-MM-DD)\n- `--to DATE` - End date (YYYY-MM-DD)\n- `--path PATH` - Path to .specstory/history (auto-detects if not specified)\n- `--top N` - Show top N worst yak shaves (default: 5)\n- `--json` - Output as JSON\n- `--verbose` - Show detailed analysis\n- `--by-mtime` - Filter by file modification time instead of filename date\n- `-o, --output FILE` - Write report to file (auto-adds .md or .json extension)\n\n**Examples:**\n\n```bash\n# Analyze last 7 days\npython scripts/analyze.py\n\n# Analyze last 30 days, show top 10\npython scripts/analyze.py --days 30 --top 10\n\n# Analyze specific date range\npython scripts/analyze.py --from 2026-01-01 --to 2026-01-28\n\n# Filter by when files were modified (not session start time)\npython scripts/analyze.py --days 7 --by-mtime\n\n# JSON output for further processing\npython scripts/analyze.py --days 14 --json\n\n# Save report to a markdown file\npython scripts/analyze.py --days 90 -o yak-report.md\n\n# Save JSON to a file\npython scripts/analyze.py --days 30 --json -o yak-data.json\n```\n\n## Output\n\n```\nYak Shave Report (2026-01-21 to 2026-01-28)\n==========================================\n\nSessions analyzed: 23\nAverage yak shave score: 34/100\n\nTop Yak Shaves:\n---------------\n1. [87/100] \"fix button alignment\" (2026-01-25)\n   Started: CSS fix for button\n   Ended up: Rewriting entire build system\n   Domain shifts: 4 (ui -> build -> docker -> k8s)\n\n2. [72/100] \"add logout feature\" (2026-01-23)\n   Started: Add logout button\n   Ended up: Refactoring auth system + session management\n   Domain shifts: 3 (ui -> auth -> database)\n\n3. [65/100] \"update readme\" (2026-01-22)\n   Started: Documentation update\n   Ended up: CI pipeline overhaul\n   Domain shifts: 2 (docs -> ci -> testing)\n\nMost Focused Sessions:\n----------------------\n1. [5/100] \"explain auth flow\" (2026-01-26) - Pure analysis, no drift\n2. [8/100] \"fix typo in config\" (2026-01-24) - Quick surgical fix\n\nPatterns Detected:\n------------------\n- You yak shave most on: UI tasks (avg 58/100)\n- Safest task type: Code review/explanation (avg 12/100)\n- Peak yak shave hours: 11pm-2am (avg 71/100)\n```\n\n## Scoring Methodology\n\nThe yak shave score (0-100) is computed from:\n\n| Factor | Weight | Description |\n|--------|--------|-------------|\n| Domain shifts | 40% | How many times file references jumped domains |\n| Goal completion | 25% | Did the original stated goal get completed? |\n| Session length ratio | 20% | Length vs. complexity of original ask |\n| Tool type cascade | 15% | Read->Search->Edit->Create->Deploy escalation |\n\n**Score interpretation:**\n- 0-20: Laser focused\n- 21-40: Minor tangents\n- 41-60: Moderate drift\n- 61-80: Significant yak shaving\n- 81-100: Epic rabbit hole\n\n## Present Results to User\n\n**IMPORTANT**: After running the analyzer script, you MUST add a personalized LLM-generated summary at the very top of your response, BEFORE showing the raw report output.\n\n### LLM Summary Guidelines\n\nGenerate a 3-5 sentence personalized commentary that:\n\n1. **Opens with a verdict** - A witty one-liner about the overall state (e.g., \"Your coding sessions this week were... an adventure.\" or \"Remarkably disciplined! Someone's been taking their focus vitamins.\")\n\n2. **Calls out the highlight** - Reference the most notable session specifically:\n   - If high yak shave: \"That January 25th button fix that somehow became a Kubernetes migration? *Chef's kiss* of scope creep.\"\n   - If low yak shave: \"Your January 26th auth flow explanation was surgical - in and out, no detours.\"\n\n3. **Identifies a pattern** - Note any recurring theme:\n   - \"You seem to yak shave most when starting with UI tasks\"\n   - \"Late night sessions are your danger zone\"\n   - \"Your refactoring sessions tend to stay focused\"\n\n4. **Ends with actionable advice or a joke** - Either:\n   - A practical tip: \"Consider time-boxing those 'quick CSS fixes' - they have a 73% yak shave rate\"\n   - Or a joke: \"At this rate, your next typo fix will result in a complete rewrite of the Linux kernel\"\n\n### Example LLM Summary\n\n```\n## 🐃 Your Yak Shave Analysis\n\nWell, well, well. You came to fix buttons and left having rewritten half the\ninfrastructure. Your average yak shave score of 47/100 puts you firmly in\n\"classic developer behavior\" territory.\n\nThe standout? That January 25th session where a CSS alignment fix somehow\nevolved into a full Kubernetes deployment overhaul. Four domain shifts later,\nyou probably forgot what a button even looks like.\n\nPattern I noticed: Your UI tasks have a 58% higher yak shave rate than your\ncode review sessions. Maybe start labeling those \"quick UI fixes\" as\n\"potential 3-hour adventures\" in your calendar.\n\nHere's the full breakdown:\n```\n\nThen show the raw report output below your summary.\n\n### What to Highlight\n\nAfter your summary, when presenting the raw results:\n1. The **worst offenders** with before/after comparison\n2. **Patterns** in when/what causes yak shaving\n3. **Actionable insight** - what task types to watch out for","tags":["specstory","yak","agent","skills","specstoryai","agent-skills","claude-code-plugin"],"capabilities":["skill","source-specstoryai","skill-specstory-yak","topic-agent-skills","topic-claude-code-plugin","topic-skills"],"categories":["agent-skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/specstoryai/agent-skills/specstory-yak","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add specstoryai/agent-skills","source_repo":"https://github.com/specstoryai/agent-skills","install_from":"skills.sh"}},"qualityScore":"0.462","qualityRationale":"deterministic score 0.46 from registry signals: · indexed on github topic:agent-skills · 24 github stars · SKILL.md body (6,747 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-22T01:01:28.993Z","embedding":null,"createdAt":"2026-04-18T22:23:48.752Z","updatedAt":"2026-04-22T01:01:28.993Z","lastSeenAt":"2026-04-22T01:01:28.993Z","tsv":"'-01':229,230,233,244,248,399,400,403,461,465,484,510,534,559,572 '-100':611,678 '-15':245 '-20':249,661 '-21':462 '-22':535 '-23':511 '-24':573 '-25':485 '-26':560 '-28':404,466 '-31':234 '-40':665 '-5':720 '-60':669 '-80':673 '/path/to/skills/specstory-yak/scripts/analyze.py':288 '/specstory-yak':194,205,209,215,220,225,235,250,257,266,272 '0':113,610,660 '1':74,478,553,725,1014 '10':222,224,384,390 '100':117 '11pm':600 '11pm-2am':599 '12/100':594 '14':259,264,430 '15':238,651 '2':87,504,546,565,758,1021 '20':241,641 '2026':228,232,243,247,398,402,460,464,483,509,533,558,571 '21':664 '23':469 '25':630 '25th':775,928 '26th':796 '2am':601 '3':97,525,529,719,807,983,1028 '30':211,214,380,388,452 '34/100':474 '4':108,499,840 '40':620 '41':668 '47/100':915 '5':121,335 '5/100':554 '58':964 '58/100':587 '61':672 '65/100':530 '7':207,219,298,374,418 '71/100':603 '72/100':505 '73':863 '8/100':566 '81':677 '87/100':479 '90':274,280,441 'action':843,1029 'add':365,506,513,694 'adventur':747,985 'advic':844 'ai':7,185 'align':482,933 'analysi':343,562,893 'analyz':4,28,47,48,293,372,378,391,468,690 'app':137 'arg':204 'argument':290 'ask':647 'auth':519,527,556,797 'auto':321,364 'auto-add':363 'auto-detect':320 'averag':470,910 'avg':586,593,602 'bash':286,371 'becam':780 'before/after':1019 'behavior':922 'box':855 'breakdown':993 'build':495,501 'button':481,490,515,776,901,952 'by-mtim':254,344,419 'calendar':988 'call':104,759 'came':898 'cascad':650 'caus':1025 'chang':107 'check':32 'chef':784 'ci':144,541,548 'classic':920 'code':8,54,186,591,741,971 'command':190 'commentari':723 'comparison':1020 'complet':629,637,881 'complex':644 'comput':613 'config':160,570 'consid':852 'creat':655 'creep':789 'css':487,858,932 'danger':831 'databas':528 'date':81,300,302,308,310,355,393 'day':206,212,213,218,260,263,275,279,291,296,375,381,387,417,429,440,451 'dd':306,314 'deep':173 'default':208,297,334 'deploy':135,656,941 'derail':20 'descript':617 'detail':342 'detect':52,180,322,578 'detour':806 'develop':921 'direct':283 'disciplin':750 'distract':37 'doc':547 'docker':502 'document':537 'domain':99,497,523,544,618,627,944 'drift':56,564,671 'e.g':739 'edit':654 'either':848 'end':171,309,491,516,539,841 'entir':494 'epic':679 'escal':657 'even':953 'evolv':936 'exampl':370,887 'explain':555 'explan':799 'extens':369 'extract':88 'factor':615 'featur':508 'file':78,101,349,358,362,408,437,448,624 'filenam':354 'filter':347,405 'firm':918 'first':95,139,146,153 'fix':143,157,480,488,567,576,777,859,876,900,934,980 'flow':557,798 'focus':115,551,663,756,839 'forgot':949 'four':943 'full':939,992 'generat':699,717 'get':636 'goal':18,62,106,168,628,635 'got':19 'guidelin':716 'half':906 'high':770 'higher':965 'highlight':762,1005 'histori':77 'hole':23,35,681 'hour':598,984 'identifi':808 'import':686 'infrastructur':908 'initi':17,90 'insight':1030 'instead':352 'intent':92 'interpret':195,659 'invok':192 'jan':237,240 'januari':226,774,795,927 'joke':847,869 'json':262,265,336,339,368,422,431,445,453 'jump':626 'k8s':503 'kernel':886 'kiss':786 'kubernet':782,940 'label':976 'languag':200 'laser':114,662 'last':210,258,273,294,373,379 'late':826 'later':946 'left':903 'length':639,642 'like':955 'liner':734 'linux':885 'llm':698,714,888 'llm-gener':697 'logout':507,514 'look':954 'low':791 'manag':522 'mani':622 'markdown':436 'maximum':118 'mayb':974 'md':366 'messag':96 'methodolog':605 'migrat':783 'minor':666 'mm':305,313 'moder':670 'modif':252,350 'modifi':410 'mtime':256,346,421 'must':693 'n':292,295,327,330 'natur':199 'need':133,141,148,155 'next':874 'night':827 'node':151 'notabl':766 'note':811 'notic':958 'o':270,281,356,442,454 'offend':125,1017 'one':733 'one-lin':732 'open':726 'option':289 'origin':61,633,646 'output':276,337,357,423,456,713,999 'overal':737 'overhaul':543,942 'pars':75 'path':315,316,317 'pattern':105,127,182,577,810,956,1022 'peak':595 'person':696,722 'pipelin':542 'potenti':982 'practic':850 'present':682,1010 'probabl':948 'process':426 'produc':63 'pure':561 'put':916 'python':287,376,385,395,415,427,438,449 'quick':574,857,978 'rabbit':22,34,680 'rang':82,394 'rate':866,872,968 'ratio':640 'raw':711,997,1012 'read':652 'readm':532 'recent':85 'recur':813 'refactor':518,834 'refer':102,625,763 'remark':749 'report':278,360,433,459,712,998 'report.md':282 'respons':707 'result':683,878,1013 'review':972 'review/explanation':592 'rewrit':493,882 'rewritten':905 'run':24,688 'safest':588 'save':267,432,444 'say':27,202 'scope':788 'score':43,67,109,473,604,609,658,913 'script':203,284,691 'scripts/analyze.py':377,386,396,416,428,439,450 'search':653 'seem':816 'sentenc':721 'session':9,55,70,86,111,187,412,467,521,552,638,742,767,828,835,929,973 'shave':14,31,42,46,66,120,131,162,333,458,472,477,581,597,608,676,772,793,819,865,892,912,967,1027 'shell':159 'shift':100,498,524,545,619,945 'show':328,341,382,709,995 'signific':674 'skill':179 'skill-specstory-yak' 'slash':189 'somehow':779,935 'someon':751 'source-specstoryai' 'specif':392,768 'specifi':325 'specstori':2,6,44,76 'specstory-yak':1 'specstory/history':11,50,319 'standout':925 'start':166,301,413,486,512,536,822,975 'state':634,738 'stay':838 'summar':122 'summari':700,715,889,1002,1008 'surgic':575,801 'system':496,520 'take':754 'tangent':667 'task':176,585,589,825,961,1032 'tend':836 'territori':923 'test':549 'theme':814 'time':253,351,414,623,854 'time-box':853 'tip':851 'tool':103,648 'top':221,223,326,329,383,389,475,704 'topic-agent-skills' 'topic-claude-code-plugin' 'topic-skills' 'track':58,98 'type':590,649,1033 'typo':568,875 'ui':500,526,584,824,960,979 'unrel':175 'updat':150,531,538 'usag':188,285 'user':26,91,197,201,685 'verbos':340 'verdict':729 'via':193 'vitamin':757 'vs':643 'watch':1035 'week':217,744 'weight':616 'well':894,895,896 'when/what':1024 'witti':731 'work':73 'worst':124,331,1016 'write':359 'yak':3,13,30,41,45,65,119,130,161,332,457,471,476,580,596,607,675,771,792,818,864,891,911,966,1026 'yak-data.json':455 'yak-report.md':269,271,443 'yyyi':304,312 'yyyy-mm-dd':303,311 'z':177 'zone':832","prices":[{"id":"a2f98335-bb3e-476d-a97e-3f071bd7db39","listingId":"add47959-b284-4550-8fb0-5d66da08ac0a","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"specstoryai","category":"agent-skills","install_from":"skills.sh"},"createdAt":"2026-04-18T22:23:48.752Z"}],"sources":[{"listingId":"add47959-b284-4550-8fb0-5d66da08ac0a","source":"github","sourceId":"specstoryai/agent-skills/specstory-yak","sourceUrl":"https://github.com/specstoryai/agent-skills/tree/main/skills/specstory-yak","isPrimary":false,"firstSeenAt":"2026-04-18T22:23:48.752Z","lastSeenAt":"2026-04-22T01:01:28.993Z"}],"details":{"listingId":"add47959-b284-4550-8fb0-5d66da08ac0a","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"specstoryai","slug":"specstory-yak","github":{"repo":"specstoryai/agent-skills","stars":24,"topics":["agent-skills","claude-code-plugin","skills"],"license":"apache-2.0","html_url":"https://github.com/specstoryai/agent-skills","pushed_at":"2026-01-31T01:24:32Z","description":"SpecStory's official collection of agent skills. Summarize, organize and create with `.specstory/history`","skill_md_sha":"9ec05497f6205be30fe0bb5fb46ec11aecf435cb","skill_md_path":"skills/specstory-yak/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/specstoryai/agent-skills/tree/main/skills/specstory-yak"},"layout":"multi","source":"github","category":"agent-skills","frontmatter":{"name":"specstory-yak","license":"Apache-2.0","description":"Analyze your SpecStory AI coding sessions in .specstory/history for yak shaving - when your initial goal got derailed into rabbit holes. Run when user says \"analyze my yak shaving\", \"check for rabbit holes\", \"how distracted was I\", or \"yak shave score\"."},"skills_sh_url":"https://skills.sh/specstoryai/agent-skills/specstory-yak"},"updatedAt":"2026-04-22T01:01:28.993Z"}}