Token导航 LogoToken导航TokenDH.com
待分类敏感数据github未标认证来源可访问许可证需确认审计通过

temporary-id-safe-output临时 ID 安全输出

Agent Skill

temporary-id-safe-output 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

447

周安装

19

GitHub Stars

4,402

下载量

157
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:temporary-id-safe-output(临时 ID 安全输出)
来源仓库:https://github.com/github/gh-aw
仓库路径:skills/temporary-id-safe-output
安装命令:
npx skills add https://github.com/github/gh-aw --skill temporary-id-safe-output
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/github/gh-aw --skill temporary-id-safe-output

简介

temporary-id-safe-output 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中围绕仓库状态、代码变更或协作事项进行整理时使用。

  • 适用于临时 ID 生成、安全输出和敏感信息脱敏场景。
  • 可自动识别并替换临时标识符,保护隐私数据。
  • 安装命令:npx skills add https://github.com/github/gh-aw --skill temporary-id-safe-output。
  • 使用前需确认权限范围、维护状态及是否触发文件读写或命令执行操作。

SKILL.md

Adding Temporary ID Support to Safe Output Jobs

This document outlines the implementation plan for adding temporary ID support to safe output jobs. Temporary IDs allow agents to reference newly created issues within the same workflow run before they have actual GitHub issue numbers.

Problem Statement

When an agent needs to create a parent issue and immediately link sub-issues to it in the same workflow run, the agent doesn't know the actual issue number until the create_issue job completes. Temporary IDs bridge this gap by allowing the agent to use placeholder IDs that are resolved to actual issue numbers at execution time.

Temporary ID Format

Temporary IDs follow the pattern aw_[A-Za-z0-9]{3,8} where:

  • aw_ is a fixed prefix identifying agentic workflow temporary IDs
  • XXXXXXXX is a 3-8 character alphanumeric string (A-Za-z0-9)

Example: aw_abc, aw_abc123, aw_Test123

Implementation Components

1. Shared Module: temporary_id.cjs

Location: pkg/workflow/js/temporary_id.cjs

This module provides shared utilities for temporary ID handling:

// Core functions
generateTemporaryId()           // Generate new temporary ID
isTemporaryId(value)            // Check if value is a temporary ID
normalizeTemporaryId(tempId)    // Normalize to lowercase for map lookups
loadTemporaryIdMap()            // Load map from GH_AW_TEMPORARY_ID_MAP env var
resolveIssueNumber(value, map)  // Resolve value to issue number (supports temp IDs)
replaceTemporaryIdReferences(text, map)  // Replace #aw_XXX references in text

2. Producer Job: create_issue

The create_issue job outputs a temporary ID map that other jobs can consume:

Go changes (pkg/workflow/create_issue.go):

  • No changes needed - already outputs temporary_id_map

JavaScript changes (pkg/workflow/js/create_issue.cjs):

  • Generate temporary ID for each created issue
  • Build map of temporary_id -> issue_number
  • Output map via core.setOutput("temporary_id_map", JSON.stringify(map))

3. Consumer Job: Adding Temporary ID Support

For each safe output job that needs to resolve temporary IDs:

Step 1: Update Go Job Builder

In pkg/workflow/<job_name>.go:

  1. Add createIssueJobName parameter to the build function:
func (c *Compiler) build<JobName>Job(data *WorkflowData, mainJobName string, createIssueJobName string) (*Job, error) {
  1. Add environment variable to pass the temporary ID map:
if createIssueJobName != "" {
    customEnvVars = append(customEnvVars, fmt.Sprintf("          GH_AW_TEMPORARY_ID_MAP: ${{ needs.%s.outputs.temporary_id_map }}\n", createIssueJobName))
}
  1. Add create_issue to the job's needs array:
needs := []string{mainJobName}
if createIssueJobName != "" {
    needs = append(needs, createIssueJobName)
}
  1. Update the SafeOutputJobConfig to use the dynamic needs:
return c.buildSafeOutputJob(data, SafeOutputJobConfig{
    // ...
    Needs: needs,
    // ...
})

Step 2: Update Compiler Jobs

In pkg/workflow/compiler_jobs.go:

Pass the createIssueJobName when building the job:

job, err := c.build<JobName>Job(data, mainJobName, createIssueJobName)

Step 3: Update JavaScript Script

In pkg/workflow/js/<job_name>.cjs:

  1. Import the temporary ID utilities:
const { loadTemporaryIdMap, resolveIssueNumber } = require("./temporary_id.cjs");
  1. Load the temporary ID map at the start of main():
const temporaryIdMap = loadTemporaryIdMap();
if (temporaryIdMap.size > 0) {
    core.info(`Loaded temporary ID map with ${temporaryIdMap.size} entries`);
}
  1. Use resolveIssueNumber() to resolve issue numbers:
const resolved = resolveIssueNumber(item.issue_number, temporaryIdMap);
if (resolved.errorMessage) {
    core.warning(`Failed to resolve issue: ${resolved.errorMessage}`);
    continue;
}
const issueNumber = resolved.resolved;
if (resolved.wasTemporaryId) {
    core.info(`Resolved temporary ID '${item.issue_number}' to issue #${issueNumber}`);
}

Step 4: Update Agent Ingestion Validation

In pkg/workflow/js/collect_ndjson_output.cjs:

Add validation for fields that accept temporary IDs:

function isValidIssueNumberOrTemporaryId(value) {
    if (typeof value === "number" && Number.isInteger(value) && value > 0) {
        return true;
    }
    if (typeof value === "string" && /^aw_[0-9a-f]{12}$/i.test(value)) {
        return true;
    }
    return false;
}

Use this validation for fields like parent_issue_number, sub_issue_number, etc.

4. Failure Handling

When temporary ID resolution fails, the job should:

  • Log a warning with core.warning() instead of failing with core.setFailed()
  • Continue processing other items
  • Include failures in the step summary
  • Complete successfully with warnings

This ensures that:

  • Partial success is possible (some links may work while others fail)
  • The workflow doesn't fail catastrophically due to a single resolution failure
  • Users can review warnings in the step summary

Example Usage

Workflow Configuration

safe-outputs:
  create-issue:
    title-prefix: "[Parent] "
    labels: [tracking]
    max: 3
  link-sub-issue:
    max: 10

Agent Output

{"type": "create_issue", "temporary_id": "aw_abc123", "title": "Parent: Feature X", "body": "..."}
{"type": "link_sub_issue", "parent_issue_number": "aw_abc123", "sub_issue_number": 42}
{"type": "link_sub_issue", "parent_issue_number": "aw_abc123", "sub_issue_number": 43}

Execution Flow

  1. main job: Agent generates output with temporary ID aw_abc123
  2. create_issue job: Creates issue #100, outputs {"aw_abc123": 100}
  3. link_sub_issue job:

- Loads temporary ID map - Resolves aw_abc123100 - Links issues #42 and #43 as sub-issues of #100

Jobs That Support Temporary IDs

JobField(s)Status
link_sub_issueparent_issue_number, sub_issue_number✅ Implemented
add_commentissue_number (via text replacement)✅ Implemented
update_issueissue_number🔄 Can be added
close_pull_request-N/A (uses PR numbers)

Testing

Unit Tests

Add tests in pkg/workflow/js/temporary_id.test.cjs for:

  • isTemporaryId() with valid and invalid inputs
  • resolveIssueNumber() with temporary IDs and regular numbers
  • loadTemporaryIdMap() with various JSON inputs

Integration Tests

Add tests in pkg/workflow/<job_name>_dependencies_test.go to verify:

  • Job includes create_issue in needs when configured
  • GH_AW_TEMPORARY_ID_MAP env var is set correctly
  • Job works without create_issue dependency

Security Considerations

  1. Temporary IDs are only valid within a single workflow run
  2. The map is passed via environment variables (not exposed externally)
  3. Agents cannot forge temporary IDs to reference issues from other workflows
  4. Resolution failures are logged but don't expose the temporary ID map contents

Checklist for Adding Support to a New Job

  • Update Go job builder to accept createIssueJobName parameter
  • Add GH_AW_TEMPORARY_ID_MAP environment variable
  • Update needs array to include create_issue conditionally
  • Update compiler_jobs.go to pass createIssueJobName
  • Import temporary ID utilities in JavaScript script
  • Use resolveIssueNumber() for issue number fields
  • Update validation in collect_ndjson_output.cjs if needed
  • Add unit tests for the resolution logic
  • Add integration tests for job dependencies
  • Update documentation

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

38.38%
按下载量换算60

Claude

30.45%
按下载量换算48

Cursor

18.97%
按下载量换算30

Gemini CLI

10.05%
按下载量换算16

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills