gitignore-profile-generator

📁 bennettphil/skill-gitignore-profile-generator 📅 6 days ago
1
总安装量
1
周安装量
#52591
全站排名
安装命令
npx skills add https://github.com/bennettphil/skill-gitignore-profile-generator --skill gitignore-profile-generator

Agent 安装分布

amp 1
opencode 1
kimi-cli 1
github-copilot 1
claude-code 1

Skill 文档

Gitignore Profile Generator

Purpose

Generate a comprehensive .gitignore by composing multiple language, framework, and tool targets. The skill is script-heavy by design: each script does one job and composes through stdin/stdout pipelines.

Scripts Overview

Script Responsibility
scripts/install.sh Verify required CLI dependencies and print setup guidance.
scripts/parse.sh Parse comma/newline-separated targets into normalized, deduplicated target names.
scripts/generate.sh Expand normalized targets into annotated ignore-rule sections from template data.
scripts/format.sh Deduplicate repeated non-comment patterns and normalize blank lines.
scripts/run.sh Main entry point that orchestrates parse -> generate -> format.
scripts/test.sh Validate list, generation, composition, deduplication, and error behavior.

Pipeline Examples

# Basic usage
./scripts/run.sh node,macos,vscode

# Compose scripts manually
printf "node\nreact\n" \
  | ./scripts/parse.sh \
  | ./scripts/generate.sh \
  | ./scripts/format.sh

# Read targets from stdin
printf "python\nterraform\n" | ./scripts/run.sh

# List supported targets
./scripts/run.sh --list

Inputs and Outputs

  • scripts/parse.sh
    • Input: args or stdin (node,macos and/or newline-separated values)
    • Output: one normalized target per line on stdout
  • scripts/generate.sh
    • Input: normalized target names on stdin (or args)
    • Output: annotated .gitignore sections on stdout
  • scripts/format.sh
    • Input: .gitignore content on stdin
    • Output: cleaned .gitignore content on stdout
  • scripts/run.sh
    • Input: args or stdin targets
    • Output: final .gitignore text on stdout

Environment Variables

  • TEMPLATE_FILE: Optional path to the template JSON map. Defaults to data/templates.json.
  • REQUIRED_TOOLS: Optional space-separated dependency override for scripts/install.sh.