temporary-id-safe-output
Plan for adding temporary ID support to safe output jobs
Install
mkdir -p .claude/skills/temporary-id-safe-output && curl -L -o skill.zip "https://mcp.directory/api/skills/download/9390" && unzip -o skill.zip -d .claude/skills/temporary-id-safe-output && rm skill.zipInstalls to .claude/skills/temporary-id-safe-output
About this skill
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 IDsXXXXXXXXis 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:
- Add
createIssueJobNameparameter to the build function:
func (c *Compiler) build<JobName>Job(data *WorkflowData, mainJobName string, createIssueJobName string) (*Job, error) {
- 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))
}
- Add
create_issueto the job'sneedsarray:
needs := []string{mainJobName}
if createIssueJobName != "" {
needs = append(needs, createIssueJobName)
}
- Update the
SafeOutputJobConfigto 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:
- Import the temporary ID utilities:
const { loadTemporaryIdMap, resolveIssueNumber } = require("./temporary_id.cjs");
- 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`);
}
- 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 withcore.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
mainjob: Agent generates output with temporary IDaw_abc123create_issuejob: Creates issue #100, outputs{"aw_abc123": 100}link_sub_issuejob:- Loads temporary ID map
- Resolves
aw_abc123→100 - Links issues #42 and #43 as sub-issues of #100
Jobs That Support Temporary IDs
| Job | Field(s) | Status |
|---|---|---|
link_sub_issue | parent_issue_number, sub_issue_number | ✅ Implemented |
add_comment | issue_number (via text replacement) | ✅ Implemented |
update_issue | issue_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 inputsresolveIssueNumber()with temporary IDs and regular numbersloadTemporaryIdMap()with various JSON inputs
Integration Tests
Add tests in pkg/workflow/<job_name>_dependencies_test.go to verify:
- Job includes
create_issuein needs when configured GH_AW_TEMPORARY_ID_MAPenv var is set correctly- Job works without
create_issuedependency
Security Considerations
- Temporary IDs are only valid within a single workflow run
- The map is passed via environment variables (not exposed externally)
- Agents cannot forge temporary IDs to reference issues from other workflows
- 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
createIssueJobNameparameter - Add
GH_AW_TEMPORARY_ID_MAPenvironment variable - Update needs array to include
create_issueconditionally - 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.cjsif needed - Add unit tests for the resolution logic
- Add integration tests for job dependencies
- Update documentation
More by githubnext
View all skills by githubnext →You might also like
flutter-development
aj-geddes
Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.
drawio-diagrams-enhanced
jgtolentino
Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.
ui-ux-pro-max
nextlevelbuilder
"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."
godot
bfollington
This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.
nano-banana-pro
garg-aayush
Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.
pdf-to-markdown
aliceisjustplaying
Convert entire PDF documents to clean, structured Markdown for full context loading. Use this skill when the user wants to extract ALL text from a PDF into context (not grep/search), when discussing or analyzing PDF content in full, when the user mentions "load the whole PDF", "bring the PDF into context", "read the entire PDF", or when partial extraction/grepping would miss important context. This is the preferred method for PDF text extraction over page-by-page or grep approaches.
Related MCP Servers
Browse all serversBoost Postgres performance with Postgres MCP Pro—AI-driven index tuning, health checks, and safe, intelligent SQL optimi
Boost productivity with Task Master: an AI-powered tool for project management and agile development workflows, integrat
DeepWiki converts deepwiki.com pages into clean Markdown, with fast, secure extraction—perfect as a PDF text, page, or i
Empower your Unity projects with Unity-MCP: AI-driven control, seamless integration, and advanced workflows within the U
Unlock powerful OLAP database analytics on ClickHouse MCP Server. Manage OLAP data with seamless online analytical proce
Sync Trello with Google Calendar easily. Fast, automated Trello workflows, card management & seamless Google Calendar in
Stay ahead of the MCP ecosystem
Get weekly updates on new skills and servers.