agentleFS
MicrosoftKnown publishermicrosoft/CCF/.github/skills/formatting-and-linting/SKILL.md

formatting-and-linting

Skill881 starsChanged 6 days agoApache-2.0View on GitHub

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.

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    1. wallstop/unity-helpers★ 178same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository3 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 0 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Run commands from the repository root.

    line 11
  2. Very specific:

    Run scripts without -f initially.

    line 17
  3. Very specific:

    Use a script's -f mode only after verifying its complete write scope is intended.

    line 20
  4. Very specific:

    Run it with ./scripts/clang-tidier.py -p build.

    line 53

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Formatting and linting

Scope and prerequisites

Run commands from the repository root. scripts/ci-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.

The Copilot setup workflow runs scripts/setup-ubuntu-ci-checks.sh for Ubuntu formatting/lint 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.

Check first, fix only task-owned changes

  • Run scripts without -f initially. Success is exit status 0; inspect failure output to distinguish changed-file issues, unrelated failures, and environment blockers.
  • 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.
  • For auto-fix, use the existing underlying formatter/linter with explicit changed-file paths and the same version/configuration used by the script. Only fix files or hunks owned by the task; preserve existing user edits.
  • 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.
  • 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.

Check inventory

Each command below is under scripts/. 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.

ScriptRelevant changesTool/checkSupports auto-fix
cpp-format-checks.shC/C++ in include/, src/, samples/clang-format-f
clang-tidier.py -p buildFirst-party C++ compile commands and their headersclang-query: braces for non-empty case bodiesNo
lean-format-checks.shAll tracked Lean filesleanfmt-f
python-format-checks.shPython in tests/, python/, scripts/black-f
python-lint-checks.shPython in python/, tests/ruff-f
python-types-checks.shPython SDK, tutorial, and SDK tests under python/PyrightNo
prettier-checks.shTS, JS, Markdown, YAML, JSON (excluding .github/**/*.md and tests/sandbox/)prettier-f
doc-newline-checks.shMarkdown and RST proseMid-sentence newline policy-f
builtin-maps-checks.shBuilt-in map names in include/ or src/, and doc/audit/builtin_maps.rstEvery public:ccf.gov.* and public:ccf.internal.* map is documentedNo
cmake-format-checks.shCMake filesgersemi-f
release-notes-checks.shCHANGELOG.md, .changes/*.md (also run prettier)extract-release-notes.py-f (changelog links only)
shellcheck-checks.shShell scripts outside 3rdparty/shellcheckNo
includes-checks.shC++ includes in include/ and src/Public/private include, exported-header, and component dependency checksNo
copyright-checks.shSource filesCopyright notices and Python shebang/executable-bit consistencyNo
openapi-checks.shJSON under doc/schemas/openapi-spec-validatorNo
todo-checks.shTracked filesDisallowed commentsNo
ascii-checks.shSource/config files and agent-instruction MarkdownASCII policy and grandfathered Unicode linesNo
ascii-policy-tests.shASCII policy/checker changesASCII policy regression testsNo
test-buckets-checks.shCMake test registration, defaults, or tests/ci-buckets.txtFresh configure and CI bucket inventory comparisonNo

Some 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/CI configuration rather than introducing a new tool.

The C++ case-scope check runs after the Debug build in .github/workflows/ci.yml, not in scripts/ci-checks.sh. It needs the compilation database, generated headers, and Clang's extra tools (18 or newer). Run it with ./scripts/clang-tidier.py -p build; use --all for a full scan and --help for selection and parallelism options.

The Lean formatting check runs in .github/workflows/lean.yml, not scripts/ci-checks.sh. It requires elan and the package's Lean toolchain. See Lean formatting setup.

The ASCII check includes Rust, but exempts Lean source files (*.lean) and excludes 3rdparty/. 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.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.