qcom-skills-contribute
Packages local modifications to an installed qcom-linux-skills skill
into a DCO-signed commit on a topic branch, following the catalog's
CONTRIBUTING.md conventions, and stops before
push unless explicitly asked to open the pull request.
This works because the default install is a symlink: an installed skill
under ~/.claude/skills/, ~/.codex/skills/ or ~/.cursor/skills/
points back into the git clone, so editing the installed skill is
editing a branchable work tree. Copy installs are handled by a fallback
that clones upstream into a temporary directory and transplants the
modified skill.
When to use
- After improving an installed skill locally (fixing a step, adding a
board or machine, clarifying instructions) and the change is worth
sharing upstream.
- To convert an agent-authored skill fix into a well-formed PR without
hand-running the fork/branch/sign-off mechanics.
Prerequisites
git with user.name and user.email configured (used verbatim for
the Signed-off-by trailer — never fabricate an identity).
gh (GitHub CLI), authenticated, only for the optional --pr step.
- The modified skill installed via symlink (preferred), via copy, or a
local clone passed with
--repo-dir.
Instructions
Identify the modified skill and review the diff before doing
anything else. For a symlink install:
clone="$(dirname "$(dirname "$(readlink -f ~/.claude/skills/<skill-name>)")")"
git -C "$clone" status --porcelain -- skills/<skill-name>
git -C "$clone" diff -- skills/<skill-name>
Summarize the change to the user and confirm it is intended for
upstream (local site-specific tweaks, credentials, or lab paths must
never be upstreamed).
Write the commit body to a temporary file: plain-English prose
wrapped at ~72 columns that first explains the problem (why the
change is needed), then the imperative actions taken. Do not restate
the diff.
Run the helper from this skill's directory (paths are relative
to the skill):
scripts/contribute.sh <skill-name> \
--summary "one-line summary for the subject" \
--body-file /tmp/commit-body.txt \
--assisted-by "AGENT_NAME:MODEL_VERSION"
The script locates the clone, shows the changes, runs the catalog
checks (shellcheck, python compile, install.sh self-verification),
creates a contribute/<skill-name> topic branch, and makes the
DCO-signed commit with the trailers in the required order. It stops
before push.
Verify the commit it reports: subject skills/<name>: summary,
why-first body, Assisted-by: before Signed-off-by:, and only the
intended files staged.
Ask the user before publishing anything. Only with their
explicit go-ahead, rerun with --pr (add --yes when running
without a tty) to fork, push the branch, and open the pull request
against main.
Output format
Report to the user:
Skill: <skill-name>
Clone: <path to the catalog clone> (symlink | copy-fallback)
Checks: PASS | FAIL (<which check failed>)
Commit: <abbrev-sha> skills/<name>: <summary> on branch <branch>
PR: not pushed (stopped before push) | <pull request URL>
Error handling
- No changes found: the script fails with "nothing to contribute" —
confirm the right skill name and that the edit landed in the
installed location.
- Checks fail: fix the reported shellcheck/python/install issues
and rerun; only use
--skip-checks when explicitly asked to.
- Copy install: the fallback clones upstream and transplants the
skill; the resulting diff can include upstream drift — re-review the
diff (step 1) inside the temporary clone before committing.
- Changes outside the skill: the script warns and excludes them;
contribute them separately (one logical change per commit).
Notes
- Non-destructive by default: nothing is pushed and no PR is opened
without
--pr, and --pr asks for confirmation.
- One skill, one commit, one PR — matching the catalog's atomic-commit
convention. For changes spanning several skills, run once per skill.
- The
Signed-off-by identity always comes from git config; the DCO
sign-off is the user's attestation, which is why step 5 requires
their explicit approval.
1---2name: qcom-skills-contribute3description: Turn local edits to an installed qcom-linux-skills skill into an upstream contribution: find the catalog clone behind the installed skill, validate the change, create a topic branch with a DCO-signed meta-qcom-style commit, and prepare (optionally open) the pull request. Use when asked to "upstream my skill changes", "propose this skill change back", "send my skill fix as a PR", or "contribute this skill improvement to the catalog". Only for changes to skills from this catalog; do NOT use for pull requests to meta-qcom or other target repositories (prepare those with qcom-yocto-pre-pr-checks).4---56# qcom-skills-contribute78Packages local modifications to an installed `qcom-linux-skills` skill9into a DCO-signed commit on a topic branch, following the catalog's10[CONTRIBUTING.md](../../CONTRIBUTING.md) conventions, and stops before11push unless explicitly asked to open the pull request.1213This works because the default install is a symlink: an installed skill14under `~/.claude/skills/`, `~/.codex/skills/` or `~/.cursor/skills/`15points back into the git clone, so editing the installed skill *is*16editing a branchable work tree. Copy installs are handled by a fallback17that clones upstream into a temporary directory and transplants the18modified skill.1920## When to use2122- After improving an installed skill locally (fixing a step, adding a23 board or machine, clarifying instructions) and the change is worth24 sharing upstream.25- To convert an agent-authored skill fix into a well-formed PR without26 hand-running the fork/branch/sign-off mechanics.2728## Prerequisites2930- `git` with `user.name` and `user.email` configured (used verbatim for31 the `Signed-off-by` trailer — never fabricate an identity).32- `gh` (GitHub CLI), authenticated, only for the optional `--pr` step.33- The modified skill installed via symlink (preferred), via copy, or a34 local clone passed with `--repo-dir`.3536## Instructions37381. **Identify** the modified skill and review the diff before doing39 anything else. For a symlink install:4041 ```bash42 clone="$(dirname "$(dirname "$(readlink -f ~/.claude/skills/<skill-name>)")")"43 git -C "$clone" status --porcelain -- skills/<skill-name>44 git -C "$clone" diff -- skills/<skill-name>45 ```4647 Summarize the change to the user and confirm it is intended for48 upstream (local site-specific tweaks, credentials, or lab paths must49 never be upstreamed).50512. **Write the commit body** to a temporary file: plain-English prose52 wrapped at ~72 columns that first explains the problem (why the53 change is needed), then the imperative actions taken. Do not restate54 the diff.55563. **Run the helper** from this skill's directory (paths are relative57 to the skill):5859 ```bash60 scripts/contribute.sh <skill-name> \61 --summary "one-line summary for the subject" \62 --body-file /tmp/commit-body.txt \63 --assisted-by "AGENT_NAME:MODEL_VERSION"64 ```6566 The script locates the clone, shows the changes, runs the catalog67 checks (shellcheck, python compile, `install.sh` self-verification),68 creates a `contribute/<skill-name>` topic branch, and makes the69 DCO-signed commit with the trailers in the required order. It stops70 before push.71724. **Verify** the commit it reports: subject `skills/<name>: summary`,73 why-first body, `Assisted-by:` before `Signed-off-by:`, and only the74 intended files staged.75765. **Ask the user** before publishing anything. Only with their77 explicit go-ahead, rerun with `--pr` (add `--yes` when running78 without a tty) to fork, push the branch, and open the pull request79 against `main`.8081## Output format8283Report to the user:8485```text86Skill: <skill-name>87Clone: <path to the catalog clone> (symlink | copy-fallback)88Checks: PASS | FAIL (<which check failed>)89Commit: <abbrev-sha> skills/<name>: <summary> on branch <branch>90PR: not pushed (stopped before push) | <pull request URL>91```9293## Error handling9495- **No changes found**: the script fails with "nothing to contribute" —96 confirm the right skill name and that the edit landed in the97 installed location.98- **Checks fail**: fix the reported shellcheck/python/install issues99 and rerun; only use `--skip-checks` when explicitly asked to.100- **Copy install**: the fallback clones upstream and transplants the101 skill; the resulting diff can include upstream drift — re-review the102 diff (step 1) inside the temporary clone before committing.103- **Changes outside the skill**: the script warns and excludes them;104 contribute them separately (one logical change per commit).105106## Notes107108- Non-destructive by default: nothing is pushed and no PR is opened109 without `--pr`, and `--pr` asks for confirmation.110- One skill, one commit, one PR — matching the catalog's atomic-commit111 convention. For changes spanning several skills, run once per skill.112- The `Signed-off-by` identity always comes from `git config`; the DCO113 sign-off is the user's attestation, which is why step 5 requires114 their explicit approval.