AgentSkillsCN

pm-new-task

在 Obsidian 中以自动生成的唯一 ID 和结构化格式创建新的任务 Markdown 文件。当用户想要开启一项全新工作时,可使用此功能。

SKILL.md
--- frontmatter
name: pm-new-task
description: Creates a new task markdown in Obsidian with auto-generated ID and structured format. Use when user wants to start new work.
argument-hint: "<task title or description>"
allowed-tools: Bash, Read, Write

Create New Task

Creates a new task file in the configured Obsidian directory with auto-incremented ID.

Workflow

  1. Read configuration: Load .claude/pm-config.json from project root

    • If missing, instruct user to run /pm-init first
  2. Generate next ID: Use scripts/obsidian_pm.py next-id command

    • Finds highest existing TASK-NNN and increments
  3. Generate task content from user input:

    • Title: Concise, English, action-oriented (e.g., "Implement user authentication")
    • Description: Clear paragraph explaining the task
    • Completion Criteria: 3-6 specific, testable criteria
    • Priority: Default 2️⃣ Normal, or convert user input:
      • high → 1️⃣ High
      • normal/medium → 2️⃣ Normal
      • low → 3️⃣ Low
    • Tags: Suggest based on task type (e.g., backend, frontend, bug, feature)
    • Topics: Optional, suggest based on project context
  4. Write task file: Use template from skills/pm-init/templates/task-template.md

    • Replace placeholders:
      • {{TASK_ID}}: From step 2
      • {{TITLE}}: From step 3
      • {{DESCRIPTION}}: From step 3
      • {{ACCEPTANCE_CRITERIA}}: One - [ ] line per criteria
      • {{PRIORITY}}: Emoji format from step 3
      • {{DATE}}: Current date YYYY-MM-DD
      • {{TIMESTAMP}}: Current datetime YYYY-MM-DD HH:mm
      • {{TAGS}}: Suggested tags (one per line with dash)
      • {{TOPICS}}: Empty or suggested topics
      • {{BRANCH}}: Leave empty (filled by /pm-update)
  5. Update changelog: Append creation entry to changelog.md

    • Format: - 📝 Created [[TASK-NNN]]: <title>
  6. Suggest branch command:

    bash
    git checkout -b feat/TASK-NNN-<slug>
    
    • slug = lowercase title with dashes (e.g., "user-auth")

Template Reference

See skills/pm-init/templates/task-template.md for exact structure.

Key sections:

  • Frontmatter with emoji status (⭕ to-do for new tasks)
  • ### 📝 <title> heading
  • #### 🧮 Content: for description and logs
  • #### ✅ Completion Criteria: for checklist
  • #### 🔗 Dependencies: for task relationships
  • #### 📋 Subtasks: for breakdown
  • #### ⏱️ Time Tracking: with timekeep code block

Example Usage

User: /pm-new-task Implement user authentication API

Output: Creates TASK-001-implement-user-authentication.md with:

  • Status: ⭕ to-do
  • Priority: 2️⃣ Normal
  • 3-6 completion criteria
  • Suggested tags: backend, api, security
  • Branch suggestion: git checkout -b feat/TASK-001-user-auth