AgentSkillsCN

create-skill-augment

确保技能文件创建于 `.agents/skills` 目录下,并将 `.cursor/skills` 设置为指向该目录的符号链接。适用于当用户请求创建或更新技能、提及技能存放位置,或询问 `.agents`/`.cursor/skills` 符号链接时使用。

SKILL.md
--- frontmatter
name: create-skill-augment
description: Ensure skills are created in `.agents/skills` and `.cursor/skills` is a symlink to that directory. Use when the user asks to create/update a skill, mentions skills location, or asks about the `.agents`/`.cursor/skills` symlink.

Create Skill Augmentation (Agents + Symlink)

Required reference

  • Read ~/.cursor/skills-cursor/create-skill/SKILL.md and follow its structure.

Storage rule

  • Always create new skills under .agents/skills/<skill-name>/SKILL.md.
  • Do not create skills in .cursor/skills directly.

Symlink rule

  • Ensure .cursor/skills is a symlink to .agents/skills.
  • If .cursor/skills exists and is not a symlink, move it aside before linking.
  • If .cursor/skills is a symlink to the wrong location, replace it.

Use:

code
if [ -e ".cursor/skills" ] && [ ! -L ".cursor/skills" ]; then
  mv ".cursor/skills" ".cursor/skills.bak"
fi
if [ -L ".cursor/skills" ] && [ "$(readlink ".cursor/skills")" != "../.agents/skills" ]; then
  rm ".cursor/skills"
fi
if [ ! -L ".cursor/skills" ]; then
  ln -s "../.agents/skills" ".cursor/skills"
fi

Output

  • Report the created skill path and confirm the symlink status.