用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/10CG/aria-plugin --skill forgejo-sync命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
项目状态扫描与智能工作流推荐,十步循环的统一入口。 收集项目状态、分析变更、推荐最佳工作流、引导用户确认执行。 使用场景:"查看项目当前状态"、"我要提交代码"、"开发新功能"
十步循环 Phase C - 集成阶段执行器,编排 C.1-C.2 步骤。 使用场景:"执行集成阶段"、"Phase C"、"提交代码并创建 PR"
Aria 项目级配置加载器(内部基础设施)。 查找、解析、验证 .aria/config.json 并合并默认值。 此 Skill 不直接触发,由其他 Skills 引用以读取项目配置。
基于 SOC 职业分类
正在显示 SKILL.md
| name | forgejo-sync |
| description | 同步 User Story 与 Forgejo Issue,发布 PRD 到 Wiki。 使用场景:"同步 Story 到 Forgejo Issue"、"发布 PRD 到 Wiki" |
| argument-hint | [--sync-direction] |
| disable-model-invocation | false |
| user-invocable | true |
| allowed-tools | Read, Glob, Grep, Edit, WebFetch |
版本: 1.0.0 | 层级: Layer 2 (Business Skill) | 分类: Requirements Skills
使用场景:
不使用场景:
requirements-validatorrequirements-sync前置条件:
| 功能 | 描述 |
|---|---|
| story-to-issue | Story → Issue 创建/更新 |
| issue-to-story | Issue → Story 状态同步 |
| bulk-sync | 批量同步所有 Story |
| status-check | 检查状态差异 |
| prd-to-wiki | PRD → Wiki 发布 |
forgejo-sync 在 PRE_CHECK 步骤中自动检测 Forgejo 配置是否就位。
forgejo.10cg.pub)CLAUDE.local.md 不存在,或文件存在但缺少 forgejo: 配置块文件不存在时:
owner/repo (支持 SSH git@host:owner/repo.git 和 HTTPS 格式)cloudflare_access.enabled: trueCLAUDE.local.md,继续后续步骤文件存在但缺少 forgejo 块时:
已有 forgejo 配置时: 不提示,直接进入原有 PRE_CHECK 流程。
与现有配置 schema 字段一致:
## Forgejo Integration
forgejo:
url: "https://forgejo.10cg.pub"
repo: "{owner}/{repo}"
cloudflare_access:
enabled: true
client_id_env: "CF_ACCESS_CLIENT_ID"
client_secret_env: "CF_ACCESS_CLIENT_SECRET"
forgejo.10cg.pub) 生效,硬编码白名单在 .claude/skills/forgejo-sync/CONFIG.md 或 CLAUDE.local.md 中配置:
forgejo:
url: "https://forgejo.example.com"
api_token: "${FORGEJO_TOKEN}" # 环境变量
repo: "owner/repo"
forgejo:
default_labels: ["user-story"]
auto_create_milestone: true
wiki:
enabled: true
page_prefix: "PRD-"
generate_index: true
| Story Status | Issue State | Issue Labels |
|---|---|---|
| draft | open | [draft] |
| ready | open | [ready] |
| in_progress | open | [in-progress] |
| blocked | open | [blocked] |
| done | closed | - |
| Issue State | Issue Labels | Story Status |
|---|---|---|
| open | draft | draft |
| open | ready | ready |
| open | in-progress | in_progress |
| open | blocked | blocked |
| closed | any | done |
| Story Priority | Issue Label |
|---|---|
| HIGH | priority:high |
| MEDIUM | priority:medium |
| LOW | priority:low |
CRITICAL: 在执行任何 Forgejo API 调用前,AI 必须遵循以下检查流程。 统一规范: 引用
PRE_CHECK.md(同目录)
# 统一的前置检查规范
引用: PRE_CHECK.md
API_Call_Pre_Check:
1. 读取配置:
- 读取 CLAUDE.local.md 或 CONFIG.md
- 查找 forgejo.cloudflare_access.enabled 值
2. 根据 enabled 状态决定调用模式:
enabled = true:
→ 使用 Cloudflare Access 模式
→ 必须添加两个头部:
- CF-Access-Client-Id: ${CF_ACCESS_CLIENT_ID}
- CF-Access-Client-Secret: ${CF_ACCESS_CLIENT_SECRET}
enabled = false 或未设置:
→ 使用标准模式
→ 仅添加标准 Authorization 头部
3. 执行后检测:
- 检查 HTTP 状态码
- 检查响应内容
-
标准模式 (cloudflare_access 未启用):
curl -H "Authorization: token ${FORGEJO_TOKEN}" \
-H "Content-Type: application/json" \
"${FORGEJO_API_URL}/repos/{owner}/{repo}/issues"
Cloudflare Access 模式 (cloudflare_access.enabled = true):
curl \
-H "Authorization: token ${FORGEJO_TOKEN}" \
-H "CF-Access-Client-Id: ${CF_ACCESS_CLIENT_ID}" \
-H "CF-Access-Client-Secret: ${CF_ACCESS_CLIENT_SECRET}" \
-H "Content-Type: application/json" \
"${FORGEJO_API_URL}/repos/{owner}/{repo}/issues"
检测条件:
自动提示模板:
⚠️ 检测到 Cloudflare Access 保护
Forgejo API 调用被拒绝 (403),响应中包含 Cloudflare challenge。
请在 CLAUDE.local.md 中添加以下配置:
forgejo:
url: "你的 Forgejo URL"
api_token: "${FORGEJO_TOKEN}"
repo: "owner/repo"
cloudflare_access:
enabled: true
client_id_env: "CF_ACCESS_CLIENT_ID"
client_secret_env: "CF_ACCESS_CLIENT_SECRET"
并设置环境变量:
export CF_ACCESS_CLIENT_ID="your-client-id"
export CF_ACCESS_CLIENT_SECRET="your-service-token"
步骤:
1. 读取 Story 文件
2. 检查是否已有 Forgejo Issue 字段
3. 如无,调用 API 创建 Issue
- Title: "[US-XXX] {标题}"
- Body: Story 内容 + 验收标准
- Labels: ["user-story", "{status}", "{priority}"]
- Milestone: 从 Story 读取
4. 更新 Story 文件的 Forgejo Issue 字段
输出:
issue_created: true
issue_number: 123
issue_url: "https://forgejo.example.com/owner/repo/issues/123"
步骤:
1. 读取 Story 文件的 Forgejo Issue 字段
2. 调用 API 获取 Issue 状态
3. 根据状态映射更新 Story Status
4. 保存 Story 文件
输出:
story_updated: true
old_status: "ready"
new_status: "in_progress"
步骤:
1. 读取 PRD 文件
2. 检查 PRD 状态是否为 approved
3. 调用 Wiki API 创建/更新页面
- Page Name: "PRD-{version}-{feature}"
- Content: PRD 内容 + 自动页脚
4. 更新 UPM 的 wiki_page 字段
输出:
wiki_published: true
page_name: "PRD-v2.1.0-notification"
page_url: "https://forgejo.example.com/owner/repo/wiki/PRD-v2.1.0-notification"
forgejo_sync_result:
action: "story-to-issue|issue-to-story|bulk-sync|prd-to-wiki"
timestamp: "2026-01-01T10:00:00+08:00"
stories:
processed: N
created: N
updated: N
skipped: N
issues:
created: N
updated: N
wiki:
published: N
skipped: N
drift:
detected: true/false
items: [...]
errors: [...]
method: POST
url: /api/v1/repos/{owner}/{repo}/issues
headers:
Authorization: "token ${FORGEJO_TOKEN}"
body:
title: "[US-001] Feature Title"
body: |
## User Story
As a {role}...
## Acceptance Criteria
- [ ] Criteria 1
- [ ] Criteria 2
---
Story File: `docs/requirements/user-stories/US-001-xxx.md`
labels: ["user-story", "ready", "priority:high"]
milestone: 1
method: PATCH
url: /api/v1/repos/{owner}/{repo}/issues/{id}
body:
state: "open|closed"
labels: [...]
method: PUT
url: /api/v1/repos/{owner}/{repo}/wiki/page/{pageName}
body:
title: "PRD: Feature Title"
content: |
{prd_content}
---
> **Source**: `docs/requirements/prd-v2.1.0-xxx.md`
> **Last Synced**: 2026-01-01T10:00:00
> **Note**: Auto-synced from Git. Do not edit directly.
用户: 为 US-001 创建 Forgejo Issue
助手执行:
1. 读取 US-001-xxx.md
2. 调用 Forgejo API 创建 Issue
3. 更新 Story 文件
输出:
forgejo_sync_result:
action: "story-to-issue"
issues:
created: 1
story_updated: "US-001-xxx.md"
issue_url: "https://..."
用户: 同步所有 Story 到 Forgejo
助手执行:
1. 扫描所有 Story 文件
2. 为无 Issue 的 Story 创建 Issue
3. 同步有 Issue 的 Story 状态
输出:
forgejo_sync_result:
action: "bulk-sync"
stories:
processed: 8
created: 3
updated: 5
用户: 发布 PRD 到 Wiki
助手执行:
1. 读取 PRD 文件
2. 检查状态为 approved
3. 调用 Wiki API 发布
输出:
forgejo_sync_result:
action: "prd-to-wiki"
wiki:
published: 1
page_url: "https://..."
┌─────────────────────────────────────────────────────────────┐
│ requirements-validator (Layer 2) │
│ │ 验证后 │
│ ▼ │
│ requirements-sync (Layer 2) │
│ │ 同步 UPM 后 │
│ ▼ │
│ forgejo-sync (Layer 2) ◄── 本 Skill │
│ │ │
│ ▼ │
│ Forgejo API (外部) │
└─────────────────────────────────────────────────────────────┘
openspec/specs/forgejo-sync/spec.mdCONFIG.md (同目录)standards/templates/user-story-template.mdstandards/templates/prd-template.md