skillsaw logo ### skillsaw **Keep your skills sharp.** A linter for the files that steer AI coding agents.
[![PyPI version](https://badge.fury.io/py/skillsaw.svg)](https://pypi.org/project/skillsaw/) [![PyPI Downloads](https://img.shields.io/pypi/dm/skillsaw)](https://pypi.org/project/skillsaw/) [![Tests](https://github.com/stbenjam/skillsaw/workflows/Tests/badge.svg)](https://github.com/stbenjam/skillsaw/actions/workflows/test.yml) [![codecov](https://codecov.io/gh/stbenjam/skillsaw/branch/main/graph/badge.svg)](https://app.codecov.io/gh/stbenjam/skillsaw) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/license/Apache-2.0)
skillsaw covers skills, plugins, instruction files (`CLAUDE.md`, `AGENTS.md`), hooks, and MCP configs. It checks their structure across every major agent ecosystem, flags supply-chain risks, and reviews their content against research and frontier-lab guidance. Safe fixes can be applied automatically; everything else comes with guidance an agent can act on. See the [supported ecosystems](https://skillsaw.org/repo-types/). **[Get started](https://skillsaw.org/getting-started/)** | **[Browse the rules](https://skillsaw.org/rules/)** | **[Read the documentation](https://skillsaw.org/)** ## See it work [Watch an AI agent grade, fix, and configure a repository from scratch.](https://asciinema.org/a/1259880) [![Watch the skillsaw onboarding demo](https://raw.githubusercontent.com/stbenjam/skillsaw/main/images/onboarding-demo.png)](https://asciinema.org/a/1259880) ## Try it Paste this into your coding agent to onboard skillsaw now: ```text Read and follow the instructions at https://raw.githubusercontent.com/stbenjam/skillsaw/refs/heads/main/skills/skillsaw-onboard/SKILL.md to onboard this repo to skillsaw. ``` Or install the onboarding skill for regular use (recommended). Run this from the repository you want to lint: ```bash npx skills add stbenjam/skillsaw ``` Select **`skillsaw-onboard`** and your coding agent, then ask the agent to use that skill to onboard the repo. See [Onboard with AI](https://skillsaw.org/getting-started/#onboard-with-ai) for plugin installation alternatives. Or run it yourself. No installation is required with [`uvx`](https://docs.astral.sh/uv/guides/tools/): ```bash uvx skillsaw tree # See what skillsaw detects uvx skillsaw # Lint the current repository uvx skillsaw fix # Apply safe, deterministic fixes uvx skillsaw baseline # Accept existing findings and fail only on new ones ``` ## What it catches - **Multi-ecosystem structure & compatibility:** schema, frontmatter, and manifest validation for Agent Skills (`SKILL.md`), Claude Code, OpenAI Codex (project config, plugins & marketplaces), Cursor plugins & marketplaces, Grok Build (project config, plugins & marketplaces), Z.ai ZCode (`.zcode/` agents, commands, skills and `config.json` hooks & MCP, plugins & marketplaces), Google Antigravity (configuration in any customization root — `.agents/`, `.agent/`, `_agents/`, `_agent/` — its `rules/` and `agents/` prose, plugins, hooks, MCP servers and registries), Agent Plugins (`plugin.json`, `mcp.json`, and the 1.1.0 portable `hooks.json`), GitHub Copilot & VS Code custom agents (`.github/agents/`), OpenCode configuration, Pi packages and project resources, native OpenClaw plugins (including optional theme and artwork declarations), APM packages, MCP server maps, and MCP Registry metadata. - **Content quality & token economy:** research-backed rules detecting instruction drift across duplicate files, excessive instruction budgets, cognitive overload, section length violations, weak language, contradictions, and repetitive inline tool-call examples. - **Discovery & repository integrity:** unreferenced bundled files, broken internal file references, inconsistent terminology, missing stop conditions, and stale baselines. - **Security & supply chain:** - **Dangerous lifecycle hooks:** blocks arbitrary remote code execution, download-and-execute (`curl | sh`, `wget | bash`), and script obfuscation (`eval`) in `hooks.json` and settings. - **Prohibited & unvetted MCP servers:** enforces strict MCP allowlists across root, plugin, and custom agent configurations. - **Prompt injection & stealth payloads:** detects invisible Unicode (ASCII smuggling, zero-width tags, bidi overrides), high-entropy encoded payloads (base64/hex), and hidden instructions in comments and code fences. - **Environment & context security:** flags dangerous environment overrides (`LD_PRELOAD`, `NODE_OPTIONS`, `PYTHONPATH`), unallowlisted dynamic context injection, and embedded credentials. - **Deterministic autofixes:** safe, instant automated fixes for invalid frontmatter, broken headings, missing manifests, unclosed code fences, and schema keys via `skillsaw fix`. skillsaw detects repository types automatically and lints multiple formats in the same project. See [supported repository types](https://skillsaw.org/repo-types/) and the [complete rule reference](https://skillsaw.org/rules/) for details. Pi packages and `.pi/` project resources are supported, including native skills, prompt templates, manifest globs, local package references, and first-party `.pi/mcp.json` servers. Shared MCP credential and policy checks cover these servers; enable `pi-mcp-valid` for Pi 1.5 field validation, including `oauth.authServerMetadataUrl`, and `pi-settings-schema` to check `.pi/settings.json` against Pi's published 1.5.0 settings schema. See [Pi configuration checks](https://skillsaw.org/rules/pi-config-valid/), [Pi settings schema checks](https://skillsaw.org/rules/pi-settings-schema/), and [Pi MCP checks](https://skillsaw.org/rules/pi-mcp-valid/). ## Built for real workflows skillsaw works locally, in CI, and inside coding-agent workflows. It provides line-level findings, explanations for every rule, deterministic autofixes, baselines for gradual adoption, GitHub and GitLab integration, and text, JSON, SARIF, HTML, and Code Climate output. Rules are configurable, and projects can add local rules or install rule plugins. Typo'd or wrong-typed rule options in `.skillsaw.yaml` are reported with did-you-mean suggestions instead of being silently ignored. | Goal | Documentation | | --- | --- | | Install and run skillsaw | [Getting Started](https://skillsaw.org/getting-started/) | | Tune rules and exclusions | [Configuration](https://skillsaw.org/configuration/) | | Adopt it without fixing everything at once | [Baselines](https://skillsaw.org/baseline/) | | Review the security model | [Supply Chain Protection](https://skillsaw.org/supply-chain-protection/) | | Supported ecosystems and tools | [Repository Types](https://skillsaw.org/repo-types/) | | Add checks to pull requests & CI | [CI Integration](https://skillsaw.org/ci/) | | Compare with `claude plugin validate` | [Claude Code validator overlap](https://skillsaw.org/claude-validate/) | | See diagnostics in VS Code | [VS Code extension](editors/vscode/README.md) and [publisher onboarding](examples/editor-onboarding/README.md) | | Understand and apply fixes | [Autofixing](https://skillsaw.org/autofixing/) | | Convert plugins to Agent Plugins v1 | [Porting to Agent Plugins](https://skillsaw.org/porting/) | | Create project-specific checks | [Custom Rules](https://skillsaw.org/custom-rules/) | | Publish reusable rule packages | [Rule Plugins](https://skillsaw.org/plugins/) | | Inspect the typed parse tree | [Lint Tree](https://skillsaw.org/lint-tree/) | | Explain Codex instruction selection and its cumulative byte cap | [Codex project instructions](https://skillsaw.org/rules/codex-project-instructions/) | | Look up commands and flags | [CLI Reference](https://skillsaw.org/cli/) | | Feed the docs to an AI agent | [llms.txt](https://skillsaw.org/llms.txt) index, [llms-full.txt](https://skillsaw.org/llms-full.txt) full docs | Updating from 0.20? See the [0.21 upgrade guide](https://skillsaw.org/upgrading-0.21/) for removed commands and rules, new opt-in checks, and Pi skill validation. Codex portable plugins can place OpenAI metadata and hooks in `plugin.json` under `extensions.com.openai`. Skillsaw follows that overlay's precedence over `.codex-plugin/plugin.json`, validates its declared resources, and checks portable `skills/` and `mcp.json` through the Agent Plugins rules. The optional `extensions.com.openai.onboardingSkill` must reference a bundled skill's `SKILL.md`, relative to the plugin root (with or without `./`). The [manifest rule](https://skillsaw.org/rules/codex-plugin-json-valid/) checks its type, effective skill membership, and containment, including symlink escapes. Project `.codex/config.toml` files also get a [targeted warning](https://skillsaw.org/rules/codex-mcp-headers/) when an HTTP MCP server uses the ignored `headers` field instead of `http_headers` or `env_http_headers`. ## Measure the result Every run produces a letter grade based on weighted violation density. The same data can be rendered as a self-contained report card for a README or project dashboard. skillsaw report card *skillsaw's own report card, generated with `skillsaw badge --large`.* Learn how to generate a [grade badge and report card](https://skillsaw.org/cli/#skillsaw-badge) for your project. ## Contributing Contributions are welcome. See [CONTRIBUTING.md](CONTRIBUTING.md) for the project guidelines and [DEVELOPMENT.md](DEVELOPMENT.md) for the local setup. Questions and bug reports belong in [GitHub Issues](https://github.com/stbenjam/skillsaw/issues). For a shareable diagnostic bundle, run `skillsaw feedback` in the affected repository and review the ZIP before attaching it to an issue. Files selected with `--include` or `--config` are copied verbatim, including BOMs and line endings. Selections default to 4 MiB per file and 16 MiB total across distinct ZIP members; use positive byte values with `--max-file-bytes` and `--max-total-bytes` to override these limits. An oversized selection stops before diagnostic lint and creates no bundle. These limits cover selected file bytes only, not diagnostic output or total process memory. skillsaw is licensed under the [Apache License 2.0](LICENSE). ## Thank you to our contributors skillsaw is better because people contribute code, bug reports, and ideas. Thank you!
Contributors
@alSergey @amy @btiernay @cblecker
@cgwalters @ehelms @EmilienM @jeffreylo
@jfchevrette @kannon92 @nyechiel @rajusem
@skyth3r @stbenjam @tchughesiv @tyraziel