[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6M7BT2JSJC9KDNZNST62164":3,"skill-same:01M6M7BT2JSJC9KDNZNST62164":68},{"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":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":44,"commitSha":45,"skillDirectory":46,"forksCount":47,"repositoryHtmlUrl":48,"repositoryHomepageUrl":49,"ownerHtmlUrl":50,"ownerBlogUrl":51,"ownerDescription":52,"updatedAt":53,"install":54,"resources":67},"01M6M7BT2JSJC9KDNZNST62164","formatting-and-linting",null,"Format and lint CCF changes. Use when choosing or running checks for C++, Python, TypeScript, JavaScript, Markdown, YAML, JSON, CMake, shell scripts, or release notes, and when deciding which checks support automatic fixes.","microsoft\u002FCCF","microsoft","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F6154722?v=4","01M698VYDXZ6JW5WH3CRV650R8","Microsoft","01M6M7BPRHNJVQCKMZJK6GEEB5",879,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FCCF\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fformatting-and-linting\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"formatting and linting","formatting","linting","when","running","markdown","shell scripts","changes","notes","javascript","lint","false","use","release notes","cmake","python","for","fixes","c++","which","2026-11-10 10:12:30",false,"---\nname: formatting-and-linting\nuser-invocable: false\ndescription: \"Format and lint CCF changes. Use when choosing or running checks for C++, Python, TypeScript, JavaScript, Markdown, YAML, JSON, CMake, shell scripts, or release notes, and when deciding which checks support automatic fixes.\"\n---\n\n# Formatting and linting\n\n## Scope and prerequisites\n\nRun commands from the repository root. `scripts\u002Fci-checks.sh` runs the individual checks concurrently, including a build-configuration check. Use the global instructions' validation policy to choose targeted local checks or the full suite.\n\nThe Copilot setup workflow runs `scripts\u002Fsetup-ubuntu-ci-checks.sh` for Ubuntu formatting\u002Flint prerequisites. Some checks use `uvx` or npm to obtain tools at runtime and need network access. The test-bucket check additionally requires the full CMake configure prerequisites; the setup workflow does not install those.\n\n## Check first, fix only task-owned changes\n\n- Run scripts without `-f` initially. Success is exit status 0; inspect failure output to distinguish changed-file issues, unrelated failures, and environment blockers.\n- The scripts generally scan whole directories or tracked files, not just the diff. Selecting a script by file type does not restrict which files it may rewrite.\n- For auto-fix, use the existing underlying formatter\u002Flinter with explicit changed-file paths and the same version\u002Fconfiguration used by the script. Only fix files or hunks owned by the task; preserve existing user edits.\n- Use a script's `-f` mode only after verifying its complete write scope is intended. Do not run repository-wide auto-fix as a default.\n- Inspect the resulting diff and rerun the applicable check. Do not remove unrelated edits to make checks pass. Report blockers and unrelated failures under the global validation policy.\n\n## Check inventory\n\nEach command below is under `scripts\u002F`. This table is a routing guide; the scripts own exact file coverage, exclusions, tool versions, and options. When changing that coverage, update this guide too. Include cross-cutting checks (copyright, disallowed comments, ASCII) when applicable.\n\n| Script | Relevant changes | Tool\u002Fcheck | Supports auto-fix |\n| --- | --- | --- | --- |\n| `cpp-format-checks.sh` | C\u002FC++ in `include\u002F`, `src\u002F`, `samples\u002F` | clang-format | `-f` |\n| `clang-tidier.py -p build` | First-party C++ compile commands and their headers | clang-query: braces for non-empty case bodies | No |\n| `lean-format-checks.sh` | All tracked Lean files | leanfmt | `-f` |\n| `python-format-checks.sh` | Python in `tests\u002F`, `python\u002F`, `scripts\u002F` | black | `-f` |\n| `python-lint-checks.sh` | Python in `python\u002F`, `tests\u002F` | ruff | `-f` |\n| `python-types-checks.sh` | Python SDK, tutorial, and SDK tests under `python\u002F` | Pyright | No |\n| `prettier-checks.sh` | TS, JS, Markdown, YAML, JSON (excluding `.github\u002F**\u002F*.md` and `tests\u002Fsandbox\u002F`) | prettier | `-f` |\n| `doc-newline-checks.sh` | Markdown and RST prose | Mid-sentence newline policy | `-f` |\n| `builtin-maps-checks.sh` | Built-in map names in `include\u002F` or `src\u002F`, and `doc\u002Faudit\u002Fbuiltin_maps.rst` | Every `public:ccf.gov.*` and `public:ccf.internal.*` map is documented | No |\n| `cmake-format-checks.sh` | CMake files | gersemi | `-f` |\n| `release-notes-checks.sh` | `CHANGELOG.md`, `.changes\u002F*.md` (also run prettier) | extract-release-notes.py | `-f` (changelog links only) |\n| `shellcheck-checks.sh` | Shell scripts outside `3rdparty\u002F` | shellcheck | No |\n| `includes-checks.sh` | Public C++ headers and their uses | Public\u002Fprivate include and exported-header checks | No |\n| `copyright-checks.sh` | Source files | Copyright notices | No |\n| `openapi-checks.sh` | JSON under `doc\u002Fschemas\u002F` | openapi-spec-validator | No |\n| `todo-checks.sh` | Tracked files | Disallowed comments | No |\n| `ascii-checks.sh` | Source\u002Fconfig files and agent-instruction Markdown | ASCII policy and grandfathered Unicode lines | No |\n| `ascii-policy-tests.sh` | ASCII policy\u002Fchecker changes | ASCII policy regression tests | No |\n| `test-buckets-checks.sh` | CMake test registration, defaults, or `tests\u002Fci-buckets.txt` | Fresh configure and CI bucket inventory comparison | No |\n\nSome report-only scripts accept `-f` for interface compatibility without changing files. For Rust or other file types not covered by a formatter above, consult their existing build\u002FCI configuration rather than introducing a new tool.\n\nThe C++ case-scope check runs after the Debug build in `.github\u002Fworkflows\u002Fci.yml`, not in `scripts\u002Fci-checks.sh`.\nIt needs the compilation database, generated headers, and Clang's extra tools (18 or newer).\nRun it with `.\u002Fscripts\u002Fclang-tidier.py -p build`; use `--all` for a full scan and `--help` for selection and parallelism options.\n\nThe Lean formatting check runs in `.github\u002Fworkflows\u002Flean.yml`, not `scripts\u002Fci-checks.sh`.\nIt requires elan and the package's Lean toolchain.\nSee [Lean formatting setup](..\u002F..\u002F..\u002Flean\u002Fdisaster-recovery\u002FREADME.md#formatting).\n\nThe ASCII check includes Rust, but exempts Lean source files (`*.lean`) and excludes `3rdparty\u002F`. Vendored third-party dependencies are exempt from the authoring policy; preserve their upstream contents. In checked files, existing Unicode is grandfathered by exact line hashes, not file-wide exemptions. Do not extend the grandfathered hashes to accept new Unicode.\n","# Formatting and linting\n\n## Scope and prerequisites\n\nRun commands from the repository root. `scripts\u002Fci-checks.sh` runs the individual checks concurrently, including a build-configuration check. Use the global instructions' validation policy to choose targeted local checks or the full suite.\n\nThe Copilot setup workflow runs `scripts\u002Fsetup-ubuntu-ci-checks.sh` for Ubuntu formatting\u002Flint prerequisites. Some checks use `uvx` or npm to obtain tools at runtime and need network access. The test-bucket check additionally requires the full CMake configure prerequisites; the setup workflow does not install those.\n\n## Check first, fix only task-owned changes\n\n- Run scripts without `-f` initially. Success is exit status 0; inspect failure output to distinguish changed-file issues, unrelated failures, and environment blockers.\n- The scripts generally scan whole directories or tracked files, not just the diff. Selecting a script by file type does not restrict which files it may rewrite.\n- For auto-fix, use the existing underlying formatter\u002Flinter with explicit changed-file paths and the same version\u002Fconfiguration used by the script. Only fix files or hunks owned by the task; preserve existing user edits.\n- Use a script's `-f` mode only after verifying its complete write scope is intended. Do not run repository-wide auto-fix as a default.\n- Inspect the resulting diff and rerun the applicable check. Do not remove unrelated edits to make checks pass. Report blockers and unrelated failures under the global validation policy.\n\n## Check inventory\n\nEach command below is under `scripts\u002F`. This table is a routing guide; the scripts own exact file coverage, exclusions, tool versions, and options. When changing that coverage, update this guide too. Include cross-cutting checks (copyright, disallowed comments, ASCII) when applicable.\n\n| Script | Relevant changes | Tool\u002Fcheck | Supports auto-fix |\n| --- | --- | --- | --- |\n| `cpp-format-checks.sh` | C\u002FC++ in `include\u002F`, `src\u002F`, `samples\u002F` | clang-format | `-f` |\n| `clang-tidier.py -p build` | First-party C++ compile commands and their headers | clang-query: braces for non-empty case bodies | No |\n| `lean-format-checks.sh` | All tracked Lean files | leanfmt | `-f` |\n| `python-format-checks.sh` | Python in `tests\u002F`, `python\u002F`, `scripts\u002F` | black | `-f` |\n| `python-lint-checks.sh` | Python in `python\u002F`, `tests\u002F` | ruff | `-f` |\n| `python-types-checks.sh` | Python SDK, tutorial, and SDK tests under `python\u002F` | Pyright | No |\n| `prettier-checks.sh` | TS, JS, Markdown, YAML, JSON (excluding `.github\u002F**\u002F*.md` and `tests\u002Fsandbox\u002F`) | prettier | `-f` |\n| `doc-newline-checks.sh` | Markdown and RST prose | Mid-sentence newline policy | `-f` |\n| `builtin-maps-checks.sh` | Built-in map names in `include\u002F` or `src\u002F`, and `doc\u002Faudit\u002Fbuiltin_maps.rst` | Every `public:ccf.gov.*` and `public:ccf.internal.*` map is documented | No |\n| `cmake-format-checks.sh` | CMake files | gersemi | `-f` |\n| `release-notes-checks.sh` | `CHANGELOG.md`, `.changes\u002F*.md` (also run prettier) | extract-release-notes.py | `-f` (changelog links only) |\n| `shellcheck-checks.sh` | Shell scripts outside `3rdparty\u002F` | shellcheck | No |\n| `includes-checks.sh` | Public C++ headers and their uses | Public\u002Fprivate include and exported-header checks | No |\n| `copyright-checks.sh` | Source files | Copyright notices | No |\n| `openapi-checks.sh` | JSON under `doc\u002Fschemas\u002F` | openapi-spec-validator | No |\n| `todo-checks.sh` | Tracked files | Disallowed comments | No |\n| `ascii-checks.sh` | Source\u002Fconfig files and agent-instruction Markdown | ASCII policy and grandfathered Unicode lines | No |\n| `ascii-policy-tests.sh` | ASCII policy\u002Fchecker changes | ASCII policy regression tests | No |\n| `test-buckets-checks.sh` | CMake test registration, defaults, or `tests\u002Fci-buckets.txt` | Fresh configure and CI bucket inventory comparison | No |\n\nSome report-only scripts accept `-f` for interface compatibility without changing files. For Rust or other file types not covered by a formatter above, consult their existing build\u002FCI configuration rather than introducing a new tool.\n\nThe C++ case-scope check runs after the Debug build in `.github\u002Fworkflows\u002Fci.yml`, not in `scripts\u002Fci-checks.sh`.\nIt needs the compilation database, generated headers, and Clang's extra tools (18 or newer).\nRun it with `.\u002Fscripts\u002Fclang-tidier.py -p build`; use `--all` for a full scan and `--help` for selection and parallelism options.\n\nThe Lean formatting check runs in `.github\u002Fworkflows\u002Flean.yml`, not `scripts\u002Fci-checks.sh`.\nIt requires elan and the package's Lean toolchain.\nSee [Lean formatting setup](..\u002F..\u002F..\u002Flean\u002Fdisaster-recovery\u002FREADME.md#formatting).\n\nThe ASCII check includes Rust, but exempts Lean source files (`*.lean`) and excludes `3rdparty\u002F`. Vendored third-party dependencies are exempt from the authoring policy; preserve their upstream contents. In checked files, existing Unicode is grandfathered by exact line hashes, not file-wide exemptions. Do not extend the grandfathered hashes to accept new Unicode.\n",{"name":5,"description":7,"user-invocable":40},"main","239b17d9a3ea6ccd5f7f41bd9a21a21ea3e5df49",".github\u002Fskills\u002Fformatting-and-linting",265,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FCCF","http:\u002F\u002Fccf.dev\u002F","https:\u002F\u002Fgithub.com\u002Fmicrosoft","https:\u002F\u002Fopensource.microsoft.com","Open source projects and samples from Microsoft","2026-11-11 07:01:14",{"source":8,"skillName":5,"commands":55,"prompt":65,"zipAvailable":66},[56,59,62],{"tool":57,"command":58},"npx","npx skills add microsoft\u002FCCF --skill formatting-and-linting",{"tool":60,"command":61},"bunx","bunx skills add microsoft\u002FCCF --skill formatting-and-linting",{"tool":63,"command":64},"pnpm","pnpm dlx skills add microsoft\u002FCCF --skill formatting-and-linting","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FCCF\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fformatting-and-linting\u002FSKILL.md",true,[],[69],{"skillNo":70,"name":71,"nameZh":6,"description":72,"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":80,"publishedAt":39},"01M6M7BXMKSR2554WHW7P8JHDF","testing","Select, run, and write CCF unit, end-to-end, partition, compatibility, coverage, and Python SDK tests. Covers prerequisites, the tests.sh wrapper, test labels, and e2e registration.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FCCF\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Ftesting\u002FSKILL.md",[75],{"categoryNo":76,"categoryName":77,"taxonomyType":78,"taxonomyTypeDesc":79},"01JBSEEDCAT000000000000008","测试与质量","SCENARIO","使用场景",[71,81,82,83,30,84,85,86,87,88,89,90,91,92,93,94,95,96,34],"coverage","labels","unit","end","tests","registration","compatibility","Wrapper","partition","write","python sdk","select","e2e","run","test","sdk"]