src/autoskillit/skills_extended/prepare-pr/SKILL.md
Preparation executor for pull-request metadata. ALWAYS invoke this skill when instructed to prepare PR metadata. Do not read plans or classify files directly — use this skill first to load the preparation workflow.
npx skillsauth add talont-org/autoskillit prepare-prInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Read plan(s), analyze changed files, select relevant arch-lens slugs, write one PR context
file per lens, and write a PR prep file for downstream use by compose-pr.
This skill Does NOT invoke arch-lens skills or any other sub-skills. It is Part 1 of 3 in the decomposed PR flow (prepare → run_arch_lenses → compose).
/autoskillit:prepare-pr {plan_paths} {run_name} {base_branch} [closing_issue] [conflict_report_path]
impl, feature/123, fix/653); determines
[FEATURE]/[FIX] prefixCloses #NNEVER:
{{AUTOSKILLIT_TEMP}}/prepare-pr/run_in_background: true is prohibited)ALWAYS:
prep_path, selected_lenses, lens_context_paths)When context is exhausted mid-execution, prep files may be partially written.
The recipe routes to on_context_limit (typically release_issue_failure),
abandoning the PR preparation.
Before emitting structured output tokens:
prep_path = (empty) as a fallbackParse positional arguments:
plan_paths (comma-separated)run_namebase_branchclosing_issue (optional — may be absent or empty string)conflict_report_path (optional — may be absent or empty string)Derive feature_branch (git rev-parse --abbrev-ref HEAD).
Create temp dir (relative to the current working directory):
mkdir -p {{AUTOSKILLIT_TEMP}}/prepare-pr/
FEATURE_BRANCH=$(git rev-parse --abbrev-ref HEAD)
ts=$(date +%Y-%m-%d_%H%M%S)
CLOSING_ISSUE="${4:-}"
Generate timestamp ts from the bash block above.
closing_issue is absent or empty string: skip — set requirements_section = "".gh issue view $CLOSING_ISSUE --json body -q .body
## Requirements section: everything from ## Requirements to the next
## heading or end of body, whichever comes first.## Requirements section found: set requirements_section = "".gh is unavailable — requirements_section remains "".Read all plan files. For each, extract the first # heading line, strip the # prefix,
and strip any trailing — PART [A-Z] ONLY suffix.
task_title.PR Title Prefix (derived from run_name):
case "$RUN_NAME" in
feature*) TITLE="[FEATURE] $BASE_TITLE" ;;
fix*) TITLE="[FIX] $BASE_TITLE" ;;
*) TITLE="$BASE_TITLE" ;;
esac
conflict_report_path is absent or empty: skip — conflict_resolution_table = "".conflict_report_path.## Per-File Resolution Decisions table.Run git diff to classify changed files:
git diff --name-only $BASE_BRANCH..$FEATURE_BRANCH
git diff --diff-filter=A --name-only $BASE_BRANCH..$FEATURE_BRANCH # new_files
git diff --diff-filter=M --name-only $BASE_BRANCH..$FEATURE_BRANCH # modified_files
Store as separate lists: new_files (added, ★) and modified_files (modified, ●).
Spawn a subagent (Task tool, model: sonnet) with the list of changed file paths and the following lens menu:
c4-container, concurrency, data-lineage, deployment, development,
error-resilience, module-dependency, operational, process-flow,
repository-access, scenarios, security, state-lifecycle
Instruct the subagent to return 1–3 lens slugs. Only include a lens if at least one changed file maps to that lens's concern.
Development lens guard: The development lens must ONLY be selected if at least one
changed file matches a build/test configuration pattern: pyproject.toml, Taskfile*,
conftest.py, .github/workflows/*, Makefile, setup.cfg, setup.py, tox.ini,
noxfile.py, or files under a ci/ directory. If no changed file matches these patterns,
do NOT select the development lens regardless of other criteria.
Output: comma-separated slug list → selected_lens_slugs.
Use the Write tool (not Bash heredocs or cat) to create each context file.
For each selected slug, write one context file to
{{AUTOSKILLIT_TEMP}}/prepare-pr/pr_arch_lens_context_{slug}_{ts}.md:
# PR Context — Changed Files
This diagram is for a Pull Request. Focus the diagram on the areas of the codebase
affected by these changes. Do not produce a generic whole-project view.
## New files (use ★ prefix on these nodes):
{list of new_files, or "None"}
## Modified files (use ● prefix on these nodes):
{list of modified_files, or "None"}
## Instructions:
- Focus exploration and the diagram on the architectural areas these files belong to
- Use ★ prefix on nodes representing new files/components
- Use ● prefix on nodes representing modified files/components
- Leave unchanged components unmarked (include only if needed for context/connectivity)
- The diagram should help PR reviewers understand the architectural impact
Record absolute paths in lens_context_paths list (comma-separated).
Read ## Summary from each plan file. Store plan summaries for the prep file.
Use the Write tool (not Bash heredocs or cat) to create the prep file.
Write PR prep file to {{AUTOSKILLIT_TEMP}}/prepare-pr/pr_prep_{ts}.md:
# PR Prep: {task_title}
## Metadata
- feature_branch: {feature_branch}
- base_branch: {base_branch}
- closing_issue: {issue_number or ""}
- plan_paths: {comma-separated}
## Title
{task_title}
## Plan Summary
{for single plan: ## Summary section content}
{for multiple plans: individual summaries with group headings}
## Requirements
{requirements_section or ""}
## Conflict Resolution Table
{conflict_resolution_table or ""}
## Changed Files
### New (★):
{new_files list or "None"}
### Modified (●):
{modified_files list or "None"}
## Selected Lenses
{comma-separated slugs}
## Lens Context Paths
{comma-separated absolute paths}
Emit these structured output tokens (literal plain text, no markdown decoration).
All output paths are absolute (resolve {{AUTOSKILLIT_TEMP}}/prepare-pr/ relative to
the current working directory using $(pwd)):
prep_path = /absolute/path/{{AUTOSKILLIT_TEMP}}/prepare-pr/pr_prep_{ts}.md
selected_lenses = module-dependency,process-flow
lens_context_paths = /abs/ctx_module-dependency_{ts}.md,/abs/ctx_process-flow_{ts}.md
development
Generate YAML recipes for .autoskillit/recipes/. Use when user says "make script skill", "generate script", "script a workflow", "write a script", "create a script", "new recipe", "write a pipeline", or when loaded by other skills for script formatting.
data-ai
Create Uncertainty Representation visualization planning spec showing error bar definitions, distribution-aware alternatives, and multi-seed variance protocols. Statistical lens answering "How is uncertainty honestly represented?"
data-ai
Create Temporal Dynamics visualization planning spec showing axis scaling (linear vs log), smoothing disclosure, epoch/step alignment, run aggregation (mean + variance bands), early-stopping markers, and wall-clock vs step-count x-axis. Temporal lens answering "Are training dynamics shown clearly and honestly?"
data-ai
Create Narrative Story Arc visualization planning spec showing visual consistency across the report (same color = same model everywhere), logical figure progression, redundant figure detection, and narrative dependency between figures. Narrative lens answering "Do the figures tell a coherent story across the report?"