AgentSkillsCN

coding-standards

为本仓库提供编码标准与规范:Shell脚本质量(shellcheck、shfmt、错误处理、Bash兼容性)、CLI工具设计(动词-名词命令模式、帮助系统、退出码、输出规范)、Markdown格式化(markdown-format、标题样式)、Python linting与格式化(ruff、uvx)、Git提交策略(提交信息格式、代理人提交限制),以及Android开发背景。适用于编写、审查或验证脚本、CLI工具、Markdown文件或Git提交是否符合项目规范时使用。也适用于被要求检查某项变更是否遵循编码标准、审查代码是否符合风格规范,或验证工作是否符合项目规则时使用。触发条件:编码标准、风格指南、验证变更、审查规范、shellcheck、shfmt、Markdown格式、Python、ruff、uvx、lint、提交信息、CLI设计、代码审查、格式化。

SKILL.md
--- frontmatter
name: coding-standards
description: >
  Provides coding standards and conventions for this repository: shell script
  quality (shellcheck, shfmt, error handling, Bash compatibility), CLI tool
  design (verb-noun command patterns, help systems, exit codes, output
  conventions), Markdown formatting (markdown-format, heading styles), python
  linting and formatting (ruff, uvx), git commit policies (message format, agent
  commit restrictions), and Android development context. Use when writing,
  reviewing, or validating scripts, CLI tools, Markdown files, or git commits
  against project conventions. Also use when asked to check whether a change
  follows coding standards, review code for style compliance, or validate work
  against project rules. Triggers: coding standards, style guide, validate
  change, review conventions, shellcheck, shfmt, markdown format, python, ruff,
  uvx, lint, commit message, CLI design, code review, formatting.

Coding Standards

This skill provides coding guidelines for making changes to codebases in this repository, as well as documentation for notations that agents may encounter.

Coding Guidelines

Markdown Quality

All Markdown files must be formatted and linted with markdown-format. Use standard heading styles without additional formatting or ALL CAPS. Do not add numbers to headings.

@references/markdown.md

Python Development

All Python files must be linted and formatted with ruff. Use uvx to run tools. Target Python 3.11+.

@references/python.md

CLI Tool Design

Standards for designing predictable and discoverable command-line interfaces, including command structure, help systems, and exit codes.

@references/cli-tools.md

Shell Script Quality

All shell scripts must be linted with shellcheck and formatted with shfmt. Fish scripts use fish_indent. Scripts must have robust error handling.

@references/shell.md

Android Development

Tools for working with Android Jetpack libraries, ADB operations, APK analysis, package management, Wear OS debugging, and emulator management.

@references/android.md

Git Operations

Agents must not commit changes automatically unless explicitly requested. Follow the specified commit message format.

@references/git.md

Agent Function Notation (AFN)

A notation for describing agent behaviour as functions of the form G<type>(prompt, context…) = output. Covers function variants, substitution, type fuzziness, and worked examples.

@references/afn.md