[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7A7REKD04W1H02ACWZH3XPY":3,"skill-same:01M7A7REKD04W1H02ACWZH3XPY":46},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":30,"ownerDescription":6,"updatedAt":31,"install":32,"resources":45},"01M7A7REKD04W1H02ACWZH3XPY","serena",null,"Choosing the instrument for a code question — when a symbol tool answers something a text scanner cannot, and which of Read, Grep, Glob or Serena is the right reach. Use when navigating or editing code you have not already read, when about to search the tree, or when a shell text utility is about to be pointed at a repository path.","button-inc\u002Fbatten","button-inc","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F62446232?v=4","01M7A7QTRSW2RGC94TEV2DFHXQ","Button Inc.","01M7A7QTT73DN15FTTW2VX074X",1,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fbutton-inc\u002Fbatten\u002Fblob\u002Fmain\u002Fskills\u002Fserena\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: serena\ndescription: Choosing the instrument for a code question — when a symbol tool answers something a text scanner cannot, and which of Read, Grep, Glob or Serena is the right reach. Use when navigating or editing code you have not already read, when about to search the tree, or when a shell text utility is about to be pointed at a repository path.\n---\n\n# Reaching for the right instrument\n\nA question about code has a shape, and the shape decides the tool. Getting this\nwrong is not a style problem: it returns a confidently wrong number.\n\n`rules\u002Fscanning.md` is the authority on which class of question takes\nwhich instrument, and it is not restated here. This skill is the **dispositional**\nhalf — when to reach, and what each reach costs — for the tools themselves.\n\n## The floor: three tools that are always right\n\n| you want                          | reach for                          | not                               |\n| --------------------------------- | ---------------------------------- | --------------------------------- |\n| a file's contents, or part of one | `Read(file_path, offset, limit)`   | `cat`, `head -N`, `sed -n 'A,Bp'` |\n| files containing a pattern        | `Grep(pattern, path, output_mode)` | `grep -rn`                        |\n| paths matching a shape            | `Glob(pattern)`                    | `ls`, `find -name`                |\n\nThese need no language server, work on every file in the tree, and return\nstructured results the harness can act on. **A shell text utility aimed at a\nrepository path is the wrong instrument, not a shortcut** — it costs a subprocess,\nreturns bytes instead of structure, and its output has to be re-read to be used.\n\nThe same utilities **downstream of a pipe** are correct and stay correct:\n`git log --oneline | grep -c CLOUD` is a filter over another command's output,\nwhich no tool replaces. The distinction is the first segment, not the program.\n\n## The ceiling: Serena answers what a scanner cannot\n\n`grep` finds a token. Serena resolves a **name**. When the question is \"which\ntype is this\", \"who calls this\", or \"what does this module expose\", a text scan\ndoes not approximate the answer — it produces a different one.\n\n| question                   | tool                                                           |\n| -------------------------- | -------------------------------------------------------------- |\n| what does this file define | `get_symbols_overview`                                         |\n| where is this symbol       | `find_symbol` (`Type\u002Fmethod` name paths, `depth` for children) |\n| who references it          | `find_referencing_symbols`                                     |\n| rename it everywhere       | `rename_symbol`                                                |\n| replace a whole definition | `replace_symbol_body`                                          |\n\n**The worked example is in this repository.** Counting `Command::new` sites:\n`grep` said 14, a syntax-only matcher said 11, name resolution said 9.\n`surface.rs` imports `clap::Command` bare, so the token names two different types\nhere and no amount of scanning separates them. Details and the standing rule for\nthat one case are in `rules\u002Frust.md`.\n\n## What Serena does and does not see\n\nCoverage is `languages:` in `.serena\u002Fproject.yml` **crossed with an\nextension-based filename matcher**, and the second half is the one that surprises\npeople. A language being enabled does not mean its files are matched: bash is\n`.sh`\u002F`.bash` only, so an extensionless program is invisible however the list is\nconfigured.\n\nCheck `.serena\u002Fproject.yml` rather than assuming. If a file is outside coverage,\nthe floor above still applies in full — `Read`\u002F`Grep`\u002F`Glob` are correct on\n100% of the tree.\n\n## Cost, so the reach is deliberate\n\nA cold container pays a full index before the first symbol answers, and there is\nno persistent cache — every session pays it again. That is a reason to let the\nindex warm while doing something else, never a reason to reach for a scanner\ninstead: the wrong answer is not cheaper than a slow one.\n\nSerena's tools may arrive **deferred**, callable only after a `ToolSearch`. That\nis one extra call. It is not a reason to substitute a text scan for a name\nresolution, and treating it as one is the measured failure this skill exists for.\n\n## When Serena is broken rather than merely unreached\n\nEverything above assumes a working server. Diagnosing one that is missing,\nslow, or cross-linked across worktrees is a different task with a different\nanswer, and it has its own durable home: read `mem:serena-setup`, which carries\nthe two startup gates, the spawn ledger, and the log reads that decide between\nthem. Do not diagnose from configuration — that memory records every wrong turn\ntaken by reasoning about config instead of opening the log.\n","# Reaching for the right instrument\n\nA question about code has a shape, and the shape decides the tool. Getting this\nwrong is not a style problem: it returns a confidently wrong number.\n\n`rules\u002Fscanning.md` is the authority on which class of question takes\nwhich instrument, and it is not restated here. This skill is the **dispositional**\nhalf — when to reach, and what each reach costs — for the tools themselves.\n\n## The floor: three tools that are always right\n\n| you want                          | reach for                          | not                               |\n| --------------------------------- | ---------------------------------- | --------------------------------- |\n| a file's contents, or part of one | `Read(file_path, offset, limit)`   | `cat`, `head -N`, `sed -n 'A,Bp'` |\n| files containing a pattern        | `Grep(pattern, path, output_mode)` | `grep -rn`                        |\n| paths matching a shape            | `Glob(pattern)`                    | `ls`, `find -name`                |\n\nThese need no language server, work on every file in the tree, and return\nstructured results the harness can act on. **A shell text utility aimed at a\nrepository path is the wrong instrument, not a shortcut** — it costs a subprocess,\nreturns bytes instead of structure, and its output has to be re-read to be used.\n\nThe same utilities **downstream of a pipe** are correct and stay correct:\n`git log --oneline | grep -c CLOUD` is a filter over another command's output,\nwhich no tool replaces. The distinction is the first segment, not the program.\n\n## The ceiling: Serena answers what a scanner cannot\n\n`grep` finds a token. Serena resolves a **name**. When the question is \"which\ntype is this\", \"who calls this\", or \"what does this module expose\", a text scan\ndoes not approximate the answer — it produces a different one.\n\n| question                   | tool                                                           |\n| -------------------------- | -------------------------------------------------------------- |\n| what does this file define | `get_symbols_overview`                                         |\n| where is this symbol       | `find_symbol` (`Type\u002Fmethod` name paths, `depth` for children) |\n| who references it          | `find_referencing_symbols`                                     |\n| rename it everywhere       | `rename_symbol`                                                |\n| replace a whole definition | `replace_symbol_body`                                          |\n\n**The worked example is in this repository.** Counting `Command::new` sites:\n`grep` said 14, a syntax-only matcher said 11, name resolution said 9.\n`surface.rs` imports `clap::Command` bare, so the token names two different types\nhere and no amount of scanning separates them. Details and the standing rule for\nthat one case are in `rules\u002Frust.md`.\n\n## What Serena does and does not see\n\nCoverage is `languages:` in `.serena\u002Fproject.yml` **crossed with an\nextension-based filename matcher**, and the second half is the one that surprises\npeople. A language being enabled does not mean its files are matched: bash is\n`.sh`\u002F`.bash` only, so an extensionless program is invisible however the list is\nconfigured.\n\nCheck `.serena\u002Fproject.yml` rather than assuming. If a file is outside coverage,\nthe floor above still applies in full — `Read`\u002F`Grep`\u002F`Glob` are correct on\n100% of the tree.\n\n## Cost, so the reach is deliberate\n\nA cold container pays a full index before the first symbol answers, and there is\nno persistent cache — every session pays it again. That is a reason to let the\nindex warm while doing something else, never a reason to reach for a scanner\ninstead: the wrong answer is not cheaper than a slow one.\n\nSerena's tools may arrive **deferred**, callable only after a `ToolSearch`. That\nis one extra call. It is not a reason to substitute a text scan for a name\nresolution, and treating it as one is the measured failure this skill exists for.\n\n## When Serena is broken rather than merely unreached\n\nEverything above assumes a working server. Diagnosing one that is missing,\nslow, or cross-linked across worktrees is a different task with a different\nanswer, and it has its own durable home: read `mem:serena-setup`, which carries\nthe two startup gates, the spawn ledger, and the log reads that decide between\nthem. Do not diagnose from configuration — that memory records every wrong turn\ntaken by reasoning about config instead of opening the log.\n",{"name":5,"description":7},"main","fa67fcdbe97054cb5ef7dec5b12707702744229e","skills\u002Fserena",0,"https:\u002F\u002Fgithub.com\u002Fbutton-inc\u002Fbatten","https:\u002F\u002Fgithub.com\u002Fbutton-inc","https:\u002F\u002Fbutton.is","2026-11-15 05:32:52",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add button-inc\u002Fbatten --skill serena",{"tool":38,"command":39},"bunx","bunx skills add button-inc\u002Fbatten --skill serena",{"tool":41,"command":42},"pnpm","pnpm dlx skills add button-inc\u002Fbatten --skill serena","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fbutton-inc\u002Fbatten\u002Fblob\u002Fmain\u002Fskills\u002Fserena\u002FSKILL.md",true,[],[47,54,61,66,71],{"skillNo":48,"name":49,"nameZh":6,"description":50,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":51,"categories":52,"keywords":53,"publishedAt":19},"01M7A7R8JAX3174FMT08DWS473","groom","Grooms a tracker row toward Ready by forcing the judgement a Ready linter cannot make — every pointer re-read against the tree, every number reproduced, the mechanism decided, the tests shown to discriminate — then validates it with an isolated, report-only cold read before promotion. Use whenever asked to groom, refine, ready, promote or pressure-test a row or a milestone (\"groom M2 to ready\", \"get CLOUD-N ready\", \"is this row ready?\"), and before moving any row into Todo.","https:\u002F\u002Fgithub.com\u002Fbutton-inc\u002Fbatten\u002Fblob\u002Fmain\u002Fskills\u002Fgroom\u002FSKILL.md",[],[],{"skillNo":55,"name":56,"nameZh":6,"description":57,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":58,"categories":59,"keywords":60,"publishedAt":19},"01M7A7R1Z3DYMGKT7PEEA2SK4P","batten","How to work in a repository gated by Batten — when to consult `batten check` versus trust the hook, how to read a pointer-only finding without re-running anything, what a deny is telling you, and how to read a verification receipt. Use when a Batten hook denies a call, when a `batten` command reports a finding, or before claiming work is done in a repository that has a batten.toml.","https:\u002F\u002Fgithub.com\u002Fbutton-inc\u002Fbatten\u002Fblob\u002Fmain\u002Fskills\u002Fbatten\u002FSKILL.md",[],[],{"skillNo":62,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":19},"01M7A7R10WCEPF0Q2QMTKVG5BR","https:\u002F\u002Fgithub.com\u002Fbutton-inc\u002Fbatten\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fserena\u002FSKILL.md",[],[],{"skillNo":67,"name":49,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":19},"01M7A7QYB00DEWZZKZS7M18QBT","https:\u002F\u002Fgithub.com\u002Fbutton-inc\u002Fbatten\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fgroom\u002FSKILL.md",[],[],{"skillNo":72,"name":56,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":19},"01M7A7QX3PZ6BD75D18QZB5AWG","https:\u002F\u002Fgithub.com\u002Fbutton-inc\u002Fbatten\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fbatten\u002FSKILL.md",[],[]]