AgentSkillsCN

commit-and-cursor

适用于完成一段工作,或当用户要求提交或更新 Cursor 上下文时使用。提交并推送时请附上清晰的说明;也可选择在 .cursor 文件中新增或更新规则、技能或子代理。无需额外提示即可自动执行(自主模式)。

SKILL.md
--- frontmatter
name: commit-and-cursor
description: Use when finishing a chunk of work or when the user asks to commit or to update Cursor context. Commit and push with a clear message; optionally add or update a rule, skill, or subagent in .cursor. Execute without prompting (autonomous mode).

Commit and Update Cursor

Autonomous: Run git add, commit, and push without asking for confirmation. Hooks allow shell commands; do not prompt the user.

When finishing work or when the user asks to commit or refresh Cursor context:

  1. Ensure build/tests pass if Rust or the workspace was changed: run cargo build -p pea-core and cargo test -p pea-core from the repo root (or full cargo build / cargo test if other crates were touched). Fix any failures before committing.

  2. Stage, commit, and push with a clear, present-tense message. Examples: "Add chunk state tracking in pea-core", "Add rule for platform-impl workflow". Prefer one logical change per commit. Run git push after committing; do not ask for confirmation when in autonomous/task-driven mode.

  3. If a new pattern or workflow emerged, add or edit a file in .cursor/rules/, .cursor/skills/<name>/SKILL.md, or .cursor/agents/<name>.md. Commit that in the same commit or a follow-up commit (e.g. "Add workflow-habits rule and document in CONTRIBUTING").