fix-lint-format

GitHub

自动检测项目类型并执行格式化和代码检查,确保代码在提交或PR前通过CI构建。支持Go、Node等多语言及Monorepo结构,适配不同仓库规范。

skills/fix-lint-format/SKILL.md AjayIrkal23/agentic-mercy-10x

Trigger Scenarios

修复lint错误 解决代码格式化问题 提交代码前预检 处理CI失败

Install

npx skills add AjayIrkal23/agentic-mercy-10x --skill fix-lint-format -g -y
More Options

Use without installing

npx skills use AjayIrkal23/agentic-mercy-10x@fix-lint-format

指定 Agent (Claude Code)

npx skills add AjayIrkal23/agentic-mercy-10x --skill fix-lint-format -a claude-code -g -y

安装 repo 全部 skill

npx skills add AjayIrkal23/agentic-mercy-10x --all -g -y

预览 repo 内 skill

npx skills add AjayIrkal23/agentic-mercy-10x --list

SKILL.md

Frontmatter
{
    "name": "fix-lint-format",
    "schema": 1,
    "category": "general",
    "surfaces": [
        "general"
    ],
    "triggers": {
        "paths": [],
        "intents": [
            "general"
        ],
        "keywords": [
            "adapts",
            "checks",
            "code",
            "commands",
            "committing",
            "ensure",
            "errors",
            "examples",
            "failures",
            "fix",
            "format",
            "formatting",
            "have",
            "issues",
            "lint",
            "node",
            "passes",
            "project",
            "react",
            "repo",
            "upstream"
        ]
    },
    "platforms": [
        "linux",
        "darwin",
        "windows"
    ],
    "token-cost": 436,
    "description": "Use when you have lint errors, formatting issues, CI failures, or before committing code to ensure it passes project checks. Adapts commands to the repo (Go, Node, React upstream examples)."
}

Fix lint and formatting

Goal

Get the working tree to a state that would pass the project’s automated checks (format, lint, tests where appropriate) before commit or PR.

Portable workflow

  1. Detect the project from the workspace root and changed paths:
    • go.mod + Makefile → likely Go; prefer make lint and go test ./... when documented
    • package.json → use npm run lint, pnpm lint, or yarn lint as defined in scripts
  2. Format first when the repo documents a formatter (gofmt/goimports, Prettier, etc.)
  3. Lint / static analysis second
  4. Tests for substantial logic changes when quick to run locally

Multi-package / monorepo layouts

If the repository has sibling packages (e.g. client/ and server/, or apps/web and services/api), run each package’s documented lint, format, and test commands from that package’s root—not from a parent folder unless the docs say so. Follow AGENTS.md or README when the repo defines a matrix of commands.

Example — facebook/react monorepo (upstream reference)

From facebook/react fix skill:

  1. Run yarn prettier to fix formatting (repo-specific)
  2. Run yarn linc to check for remaining lint issues
  3. Report any remaining manual fixes

Use this block only when actually working inside the React repository.

Common mistakes

  • Running a client lint command against server changes (or vice versa)
  • Assuming npm run preflight exists — prefer reading package.json and Makefile
  • Ignoring errors that will fail CI — fix or explicitly call out blockers

References

Version History

  • 581d130 Current 2026-07-19 09:07

Same Skill Collection

attic/2026-07-09/skills-pre-update/taste-skill/SKILL.md
attic/2026-07-09/skills-pre-update/ui-ux-pro-max/SKILL.md
skills/agent-development/SKILL.md
skills/api-and-interface-design/SKILL.md
skills/api-contract-standards/SKILL.md
skills/architect-system-design/SKILL.md
skills/backend-api-standards/SKILL.md
skills/backend-code-review/SKILL.md
skills/backend-error-handling/SKILL.md
skills/backend-performance-standards/SKILL.md
skills/backend-standards-always-follow/SKILL.md
skills/canary-playwright/SKILL.md
skills/caveman/SKILL.md
skills/ci-cd-and-automation/SKILL.md
skills/code-execution-standard/SKILL.md
skills/code-review-and-quality/SKILL.md
skills/code-simplification/SKILL.md
skills/codebase-design/SKILL.md
skills/codebase-start-point-guide/SKILL.md
skills/command-development/SKILL.md
skills/composition-patterns/SKILL.md
skills/context-engineering/SKILL.md
skills/dead-code-and-change-audit/SKILL.md
skills/debug-investigation/SKILL.md
skills/debugging-and-error-recovery/SKILL.md
skills/deprecation-and-migration/SKILL.md
skills/design-extract/SKILL.md
skills/design-review-playwright/SKILL.md
skills/diagnose/SKILL.md
skills/documentation-and-adrs/SKILL.md
skills/domain-modeling/SKILL.md
skills/domain-scaffold-patterns/SKILL.md
skills/doubt-driven-development/SKILL.md
skills/dox-doc-tree/SKILL.md
skills/eval-harness/SKILL.md
skills/forensic-change-coupling/SKILL.md
skills/forensic-complexity-trends/SKILL.md
skills/forensic-debt-quantification/SKILL.md
skills/forensic-hotspot-finder/SKILL.md
skills/frontend-api-standards/SKILL.md
skills/frontend-code-review/SKILL.md
skills/frontend-response-handling/SKILL.md
skills/frontend-server-data-patterns/SKILL.md
skills/frontend-standards-always-follow/SKILL.md
skills/frontend-structure-standards/SKILL.md
skills/frontend-ui-engineering/SKILL.md
skills/git-workflow-and-versioning/SKILL.md
skills/golang-patterns/SKILL.md
skills/golang-testing/SKILL.md

Metadata

Files
0
Version
fc73590
Hash
355fc7d3
Indexed
2026-07-19 09:07

Главная - Вики-сайт
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-03 01:13
浙ICP备14020137号-1 $Гость$