Token导航 LogoToken导航TokenDH.com
开发需要联网github未标认证来源可访问许可证需确认审计异常

code-formatter-installer代码格式化程序安装程序

Agent Skill

code-formatter-installer 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

196

周安装

8

GitHub Stars

2

下载量

63
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:code-formatter-installer(代码格式化程序安装程序)
来源仓库:https://github.com/monkey1sai/openai-cli
仓库路径:skills/code-formatter-installer
安装命令:
npx skills add https://github.com/monkey1sai/openai-cli --skill code-formatter-installer
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/monkey1sai/openai-cli --skill code-formatter-installer

简介

code-formatter-installer 用于处理 GitHub 仓库、Issue 和 Pull Request 信息。

  • 适合在代码协作或仓库状态整理场景中使用。
  • 通过 npx skills add 命令从指定 GitHub 路径安装并使用该技能。
  • 安装前需确认权限范围、维护状态及是否触发联网或命令执行。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Code Formatter & Linter Installer

Establish consistent code formatting and linting across your project.

Core Workflow

  1. Detect stack: Identify language/framework (JS/TS, Python, Go, Rust)
  2. Choose tools: Select appropriate formatters and linters
  3. Generate configs: Create config files with best-practice rules
  4. Add scripts: Include npm/package scripts for format/lint
  5. Configure editor: Provide VS Code, IntelliJ, Vim settings
  6. Setup pre-commit: Add git hooks for automatic formatting
  7. CI integration: Suggest GitHub Actions or CI config

Tool Selection by Stack

JavaScript/TypeScript

  • Formatter: Prettier
  • Linter: ESLint + typescript-eslint
  • Editor: EditorConfig
  • Hooks: Husky + lint-staged

Python

  • Formatter: Black + isort
  • Linter: Ruff or Flake8 + mypy
  • Hooks: pre-commit

Go

  • Formatter: gofmt + goimports
  • Linter: golangci-lint

Rust

  • Formatter: rustfmt
  • Linter: clippy

Configuration Templates

Prettier (.prettierrc.json)

{
  "semi": true,
  "trailingComma": "es5",
  "singleQuote": true,
  "printWidth": 100,
  "tabWidth": 2,
  "arrowParens": "avoid"
}

ESLint (.eslintrc.json)

{
  "extends": [
    "eslint:recommended",
    "plugin:@typescript-eslint/recommended",
    "plugin:react/recommended",
    "prettier"
  ],
  "rules": {
    "no-console": "warn",
    "@typescript-eslint/no-unused-vars": "error"
  }
}

EditorConfig (.editorconfig)

root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.py]
indent_size = 4

[*.md]
trim_trailing_whitespace = false

Python (pyproject.toml)

[tool.black]
line-length = 100
target-version = ['py311']

[tool.isort]
profile = "black"
line_length = 100

[tool.mypy]
strict = true
warn_return_any = true

Package Scripts

JavaScript/TypeScript (package.json)

{
  "scripts": {
    "format": "prettier --write .",
    "format:check": "prettier --check .",
    "lint": "eslint . --ext .ts,.tsx,.js,.jsx",
    "lint:fix": "eslint . --ext .ts,.tsx,.js,.jsx --fix",
    "typecheck": "tsc --noEmit"
  }
}

Python

# Makefile or scripts
format:
	black .
	isort .

lint:
	ruff check .
	mypy .

format-check:
	black --check .
	isort --check .

Git Hooks Setup

Husky + lint-staged (Node.js)

  1. Install dependencies:
npm install --save-dev husky lint-staged
npx husky init
  1. Configure lint-staged (.lintstagedrc.json):
{
  "*.{ts,tsx,js,jsx}": ["eslint --fix", "prettier --write"],
  "*.{json,md,yml}": ["prettier --write"]
}
  1. Add pre-commit hook (.husky/pre-commit):
#!/bin/sh
npx lint-staged

pre-commit (Python)

  1. Create.pre-commit-config.yaml:
repos:
  - repo: https://github.com/psf/black
    rev: 24.1.1
    hooks:
      - id: black

  - repo: https://github.com/pycqa/isort
    rev: 5.13.2
    hooks:
      - id: isort

  - repo: https://github.com/astral-sh/ruff-pre-commit
    rev: v0.2.0
    hooks:
      - id: ruff
        args: [--fix]

  - repo: https://github.com/pre-commit/mirrors-mypy
    rev: v1.8.0
    hooks:
      - id: mypy
  1. Install:
pip install pre-commit
pre-commit install

Editor Configuration

VS Code (settings.json)

{
  "editor.defaultFormatter": "esbenp.prettier-vscode",
  "editor.formatOnSave": true,
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": true
  },
  "[python]": {
    "editor.defaultFormatter": "ms-python.black-formatter"
  }
}

VS Code Extensions (.vscode/extensions.json)

{
  "recommendations": [
    "esbenp.prettier-vscode",
    "dbaeumer.vscode-eslint",
    "editorconfig.editorconfig",
    "ms-python.black-formatter"
  ]
}

IntelliJ/WebStorm

  • Enable: Settings → Languages & Frameworks → JavaScript → Prettier → On save
  • Enable: Settings → Tools → Actions on Save → Reformat code

CI Integration

GitHub Actions (.github/workflows/lint.yml)

name: Lint

on: [push, pull_request]

jobs:
  lint:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 20
      - run: npm ci
      - run: npm run format:check
      - run: npm run lint
      - run: npm run typecheck

Pre-merge checks

# .github/workflows/pr-checks.yml
- name: Check formatting
  run: |
    npm run format:check || {
      echo "Code is not formatted. Run 'npm run format' locally."
      exit 1
    }

Installation Checklist

For every setup, provide:

  • Config files (.prettierrc,.eslintrc,.editorconfig, etc.)
  • Ignore files (.prettierignore,.eslintignore)
  • Package scripts (format, lint, format:check, lint:fix)
  • Git hooks (husky/pre-commit)
  • Editor settings (.vscode/settings.json)
  • CI workflow (.github/workflows/lint.yml)
  • Documentation (README section on running lint/format)

Best Practices

  1. Run formatter last: Prettier should override other formatting rules
  2. Extend configs: Use popular presets (Airbnb, Standard, etc.)
  3. Ignore generated files: Add build outputs to ignore files
  4. Make hooks skippable: Allow git commit --no-verify for emergencies
  5. Document process: Add "Code Style" section to CONTRIBUTING.md
  6. Test on clean install: Ensure configs work without local editor setup
  7. Keep rules minimal: Start strict, relax if needed

Common Configurations

See assets/configs/ for ready-to-use config files:

  • Next.js + TypeScript
  • React + TypeScript
  • Node.js + TypeScript
  • Python FastAPI
  • Python Django

Bypass Instructions (Emergencies)

# Skip pre-commit hooks
git commit --no-verify

# Skip CI checks (not recommended)
git push --no-verify

Document when bypass is acceptable (hotfixes, emergencies only).

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

36.66%
按下载量换算23

Claude

28.5%
按下载量换算18

Cursor

18.56%
按下载量换算12

Gemini CLI

8.07%
按下载量换算5

安全审计

Gen Agent Trust Hub

未通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills