lewibs/dark-factory/mixed-github-freeform-input
Claude Code and agent skill by lewibs/dark-factory
- community
Checking that the SKILL.md file is still in the repository.
Use this skill when a command must accept a comma-separated list that mixes GitHub issue references (#42) with quoted freeform descriptions, normalize them to a single JSON structure, and handle both gracefully.
Install
npx vskill@latest install lewibs/dark-factory/mixed-github-freeform-inputSKILL.md
The same SKILL.md was published earlier as lewibs/dark-factory/mixed-github-freeform-input.
When to use
When building a command that should accept issue references from multiple sources in a single argument:
- A list that mixes
#42,123(bare number), and"freeform text"in one string - The caller may pipe GitHub issue numbers from
gh issue listor type descriptions directly - The consuming agent needs a uniform JSON structure regardless of input form
Steps
- Accept input as a single comma-separated string (argument or stdin):
``bash ISSUE_LIST="${1:-}" ``
- Split on commas with
IFS=','— this handles the common case cleanly. Do NOT useread -das it has portability issues with quoted commas inside items:
``bash IFS=',' read -ra ITEMS <<< "$ISSUE_LIST" ``
- For each item, trim whitespace with
xargsbefore classifying:
``bash item=$(echo "$item" | xargs) ``
- Classify each item with ordered regex checks:
``bash if [[ "$item" =~ ^#([0-9]+)$ ]]; then # GitHub issue with # prefix NUMBER="${BASH_REMATCH[1]}" elif [[ "$item" =~ ^[0-9]+$ ]]; then # Bare numeric — treat as GitHub issue number NUMBER="$item" elif [[ "$item" =~ ^\"(.*)\"$ ]]; then # Quoted freeform description DESCRIPTION="${BASH_REMATCH[1]}" else # Unquoted freeform description (fallback) DESCRIPTION="$item" fi ``
- For GitHub issue numbers, fetch metadata with
gh issue viewand handle failure gracefully:
``bash ISSUE_JSON=$(gh issue view "$NUMBER" --json number,title,body 2>/dev/null || echo '') if [[ -z "$ISSUE_JSON" ]]; then echo "Warning: GitHub issue #$NUMBER not found, skipping" >&2 continue fi TITLE=$(echo "$ISSUE_JSON" | jq -r '.title // "N/A"') BODY=$(echo "$ISSUE_JSON" | jq -r '.body // ""' | head -c 500) ``
- Build uniform JSON output using
jq -nwith--arg/--argjsonto avoid shell-escaping bugs:
```bash # GitHub entry ENTRY=$(jq -n --arg type "github" --argjson number "$NUMBER" \ --arg title "$TITLE" --arg body "$BODY" \ '{type: $type, number: $number, title: $title, body: $body}')
# Freeform entry ENTRY=$(jq -n --arg type "freeform" --arg description "$DESCRIPTION" \ '{type: $type, description: $description}')
OUTPUT=$(echo "$OUTPUT" | jq ".issues += [$ENTRY]") ```
- Output the final JSON to stdout so callers can pipe it directly:
``bash echo "$OUTPUT" ``
Notes
- Truncate issue body to ~500 chars with
head -c 500— full bodies are rarely needed and can bloat JSON passed between scripts. - Never use
echo "$var" | jqfor values that might contain newlines or special characters — always usejq -n --argto safely inject shell variables into JSON. - The
||ingh issue view ... 2>/dev/null || echo ''is intentional:ghexits non-zero for missing issues, which would abort the script underset -euo pipefail. The empty string fallback is the skip signal. - If the input string is empty or produces no valid items after parsing, the script should output
{"issues": []}and let the caller decide whether that is an error.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/mixed-github-freeform-input/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/lewibs/dark-factory/mixed-github-freeform-input)