SuperAPI AI Directory

project-switch

Office & productivity

View repository

Updated 10-16 08:54

About this skill

Load context

First execution: Read ../references/项目空间结构.md to learn the project.md field specification.

This skill itself does not read project content, it only sets the current_project_code context variable. Subsequent skills use this variable to locate the project directory.


/finance:project-switch — switch project context

Switch the "project context" of the current session to the specified project. All subsequent skill operations are based on that project's project.md thresholds/scope/historical context.

Command format

/finance:project-switch <project-code> [--show]

Parameters:

  • <project-code>: project code (e.g. 2026-audit-ic / Q2-2026-budget / tax-filing-2026 / m-and-a-deal-alpha)
  • --show: only show the currently active project, do not switch

Operation steps

Step 1: Locate the project directory

项目根目录 = ~/.config/finance-skills/projects/{project-code}/

If the directory does not exist:

❌ 项目不存在: {project-code}

请使用 /finance:project-list 查看现有项目
或 /finance:project-new 创建新项目

Step 2: Validate project.md

Read {project-root}/project.md, validate:

  • Required fields are present (project type/code/owner/period/status)
  • YAML frontmatter parses correctly
  • 状态 field is a valid value (planning / active / fieldwork / reporting / closed)

If project.md is corrupted or missing fields:

⚠️ project.md 损坏或缺必填字段

请运行 /finance:project-repair {project-code} 自动修复
或手动编辑 ~/.config/finance-skills/projects/{project-code}/project.md

Step 3: Check project status

Read the 状态 field:

Status Whether switching is allowed Warning
planning ✅ "Project is still in the planning stage, execution has not started"
active ✅ None
fieldwork ✅ None
reporting ✅ "Project is in the reporting stage, new findings may not affect the final conclusion"
closed ⚠️ "Project is closed, switching to read-only mode"
archived ❌ "Project is archived, cannot switch"

closed status allows switching but prompts read-only.

Step 4: Write to session context

Inject the following information into the session context:

current_project = {
    code: "{project-code}",
    type: "{project-type}",
    root: "~/.config/finance-skills/projects/{project-code}/",
    status: "{状态}",
    started: "{开始日期}",
    next_milestone: "{下次关键日期}",
}

Key constraint: only one project can be active at a time. If another project is already active:

⚠️ 当前已激活项目: {old-code}

切换到 {new-code} 将丢弃 {old-code} 的会话状态(包括未保存的临时笔记)
确认切换吗?[y/N]

Step 5: Output the switch result

On a successful switch, output:

════════════════════════════════════════
✅ 已切换到项目: {project-code}

项目类型: {type}
负责人: {name}
周期: {period}
当前阶段: {stage}
上次活动: {last-activity}
下次关键日期: {next-milestone}
════════════════════════════════════════

项目根目录: ~/.config/finance-skills/projects/{project-code}/
所有 skill 操作的产出物将记录到此项目。

输入 /finance:project-status 查看项目详情
输入 /finance:project-list 切换到其他项目
════════════════════════════════════════

Examples

→ Example: the user says "switch to the 2026 internal control audit project", the system should switch to 2026-audit-ic, load that project's project.md, and output the project summary.

→ Example: the user says "I want to start the Q2 budget review", the system should first check whether Q2-2026-budget exists; if it exists, switch, if it does not exist, prompt to use /finance:project-new to create it.

→ Example: the user says "which project is currently being worked on", the system should use --show mode, and only output information about the currently active project.


Collaboration with other skills

After switching projects, the following skills will automatically use the project context:

Skill Purpose of the project context
/internal-audit:control-testing Write control testing workpapers to projects/{code}/control-testing/
/month-end-close:* Write monthly closing reports to projects/{code}/close-{YYYY-MM}/
/m-and-a:* Write due diligence materials to projects/{code}/due-diligence/
/board-reporting:* Write board materials to projects/{code}/board-{YYYY-Q}/

Called when no project is switched: the above skills can still be executed (they do not strictly depend on a project), but will prompt "no project context specified, outputs will be written to the default directory ~/.config/finance-skills/scratch/"。


Close project

To close the current project, use /finance:project-archive {project-code} or modify the project.md field of 状态 .

After switching to the closed state:

  • the project directory becomes read-only
  • no longer appears in the "active" list of /finance:project-list 's "active" list
  • can be reopened via /finance:project-switch {code} (will automatically restore the closed state)

Notes

  • No project ≠ cannot use skills. Basic skills (such as /tax-filing:vat-monthly-declare) can run without project context
  • Switching does not affect data: all project files are saved independently; switching only "activates focus"
  • Multi-task concurrency: the project is a singleton. If tracking multiple projects simultaneously (such as annual audit + Q2 budget), switch in two separate session windows; do not mix them in the same session
  • Credentials are not in the project directory: API credentials are uniformly stored in ~/.config/finance-skills/credentials/, not inside the project directory (to avoid leakage)