TE

temporary-id-safe-output

A planning utility for implementing temporary ID support within safe output job processes.

Install

mkdir -p .claude/skills/temporary-id-safe-output && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/9390" && unzip -o skill.zip -d .claude/skills/temporary-id-safe-output && rm skill.zip

Installs to .claude/skills/temporary-id-safe-output

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Add temporary ID support to safe-output jobs end to end.
56 charsno explicit “when” trigger
Advanced

Key capabilities

  • Generate temporary IDs
  • Resolve temporary IDs to issue numbers
  • Replace references in text
  • Validate temporary ID formats

How it works

It uses a shared module to map temporary placeholders to real issue numbers created during a workflow run, allowing for sub-issue linking.

Inputs & outputs

You give it
Temporary ID map
You get back
Resolved issue numbers

When to use temporary-id-safe-output

  • Planning safe output integration
  • Drafting implementation steps for temporary IDs
  • Reviewing output job logic

About this skill

Adding Temporary ID Support to Safe Output Jobs

Use this implementation plan for temporary ID support in safe output jobs. Temporary IDs let agents reference newly created issues in the same run before real issue numbers exist.

Problem Statement

When an agent creates a parent issue and immediately links sub-issues in the same run, it does not know the real issue number until create_issue completes. Temporary IDs bridge this gap with placeholders resolved 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

When not to use it

  • Cross-workflow ID referencing

Prerequisites

Safe output job configuration

Limitations

  • Valid only within a single workflow run
  • Requires integration into job builders

How it compares

It enables linking of issues that do not yet exist, bridging the gap between issue creation and reference.

Compared to similar skills

temporary-id-safe-output side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
temporary-id-safe-output (this skill)03moNo flagsAdvanced
trello412moReviewBeginner
ultrathink282moNo flagsAdvanced
autonomous-agents106moNo flagsAdvanced

Try saying

Example prompts that trigger this skill in your AI assistant.

You might also like

trello

openclaw

Manage Trello boards, lists, and cards via the Trello REST API.

41205

ultrathink

dashed

Invoke deep sequential thinking for complex problem-solving. Use when the user says 'use ultrathink', 'ultrathink', or when tackling problems that require careful step-by-step reasoning, planning, hypothesis generation, or multi-step analysis.

28115

autonomous-agents

davila7

Autonomous agents are AI systems that can independently decompose goals, plan actions, execute tools, and self-correct without constant human guidance. The challenge isn't making them capable - it's making them reliable. Every extra decision multiplies failure probability. This skill covers agent loops (ReAct, Plan-Execute), goal decomposition, reflection patterns, and production reliability. Key insight: compounding error rates kill autonomous agents. A 95% success rate per step drops to 60% b

1041

executing-plans

obra

Use when you have a written implementation plan to execute in a separate session with review checkpoints

643

github-project-management

ruvnet

Comprehensive GitHub project management with swarm-coordinated issue tracking, project board automation, and sprint planning

427

chief-architect

ananddtyagi

PERSONAL APP ARCHITECT - Strategic development orchestrator for personal productivity applications. Analyzes project context, makes architectural decisions for single-developer projects, delegates to specialized skills, and ensures alignment between user experience goals and technical implementation. Optimized for personal apps targeting 10-100 users.

617

Search skills

Search the agent skills registry