AgentSkillsCN

pm-init

为当前项目初始化 Obsidian 项目管理跟踪功能,创建配置文件并搭建 Obsidian 目录结构。当您需要着手建立项目跟踪机制时,可使用此功能。

SKILL.md
--- frontmatter
name: pm-init
description: Initializes Obsidian PM tracking for current project. Creates config and Obsidian directory structure. Use when setting up tracking.
argument-hint: "[vault-path] [project-name]"
allowed-tools: Bash, Read, Write

Initialize Obsidian PM

Sets up project management integration between code repository and Obsidian vault.

Steps

  1. Get configuration:

    • Ask user for Obsidian vault path (if not in $ARGUMENTS)
    • Ask user for project name (if not in $ARGUMENTS)
  2. Validate vault path:

    • Check that directory exists
    • Warn if path doesn't look like an Obsidian vault
  3. Create configuration file: .claude/pm-config.json

    json
    {
      "obsidian_vault": "<vault-path>",
      "project_path": "projects/<project-name>",
      "task_dir": "tasks",
      "changelog_file": "changelog.md",
      "task_prefix": "TASK",
      "auto_mode": false
    }
    
  4. Create Obsidian directories:

    bash
    mkdir -p {vault}/{project_path}/tasks/
    
  5. Create README.md: Use template from templates/readme-template.md

    • Explains project structure
    • Links to conventions
    • Usage instructions
  6. Create changelog.md: Use template from templates/changelog-template.md

    • Frontmatter with metadata
    • Section divider
    • Initial entry
  7. Copy task template: Ensure templates/task-template.md is accessible for future task creation

  8. Next steps: Suggest running:

    bash
    /pm-new-task <description>
    

Conventions

These conventions are enforced throughout the plugin:

Task IDs

  • Format: TASK-001 (zero-padded 3 digits)
  • Files: TASK-001-short-description.md
  • Sequential numbering

Git Integration

  • Branches: feat/TASK-001-short-desc, fix/TASK-002-bug-desc
  • Commits: feat(TASK-001): description, fix(TASK-002): description
  • Tag extraction: Plugin parses both branch names and commit messages

Status Flow

code
🎯 longTerm → 📋 backlog → ⭕ to-do → ⏳ in-progress → ✅ completed
                                              ↓
                                        ⏸️ pending → ⏳ in-progress
                                              ↓
                                        ❌ cancelled
  • New tasks default to ⭕ to-do
  • First commit triggers ⏳ in-progress
  • All criteria checked triggers ✅ completed

Language

  • All task content in English
  • Consistent terminology
  • Professional technical writing

Example Usage

bash
/pm-init ~/Documents/ObsidianVault my-api-project

Creates:

  • .claude/pm-config.json in code repo
  • ~/Documents/ObsidianVault/projects/my-api-project/tasks/ directory
  • README and changelog files