attach-assets
Upload files (images, logs, screenshots) to a dedicated orphan branch in the repository and embed them in a GitHub issue or PR comment or description, so…
Skill by tomzx
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/tomzx-attach-assets
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: writing
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/attach-assets
Tools it pre-approves 3
From allowed-tools in SKILL.md: the agent may use these without asking you each time.
Bash(gh:*,git:*),Read
What's inside
- Skill name
attach-assets- Description
- Upload files (images, logs, screenshots) to a dedicated orphan branch in the repository and embed them in a GitHub issue or PR comment or description, so sensitive content stays out of the main branch and out of inline user-attachments. Use when the user says /attach-assets, "attach image to issue", "attach screenshot to PR", "add image to a GitHub comment programmatically", "host issue images on a branch", "upload sensitive images for an issue", or wants to embed files in a GitHub description or comment without committing them to main.
- License
- MIT
- Allowed tools
- Bash(gh:*,, git:*),, Read
- Instructions
- 239 lines in SKILL.md · view on GitHub
Before installing
- Pre-approves some shell commands
Files (1)
- SKILL.md
SKILL.md (first lines)
# Attach Assets
Copies one or more local files onto a dedicated **orphan branch** in the repository via a throwaway git worktree, then embeds them in a GitHub issue or PR as a comment (default) or appended to the description body.
The files never land on the default branch and never become inline `user-attachments`, which suits sensitive screenshots, logs, and internal diagrams.
Because the branch is orphan (no shared history with `main`) and the files are placed through a temporary worktree, the user's working branch and tree are left untouched.
The assets are still in git history on that branch, so they are visible to everyone with read access to the repo and persist until the branch is deleted and history rewritten; do not use this for material that must never enter the repo at all (use signed expiring object-store URLs for that).
## Prerequisites
- The command runs inside a working clone of the target repository.
- `git` with push access to the repository.
- `gh` CLI authenticated with write access, for posting the comment or patching the description body.
- Files must be under GitHub's per-file size limit (roughly 100 MB), since they are committed through ordinary git.
- A target issue or PR.
Provide a full GitHub URL for unambiguous parsing, or a bare number with `--pr` / `--issue` (default) using the current repository.
- For private repos, the rendered image is visible to collaborators when viewed in the issue or PR, but the raw URL itself requires a token for a direct fetch.
## Skill attribution (GitHub)
Before posting the comment or patching the body, read [`github-post-attribution/SKILL.md`](../github-post-attribution/SKILL.md) and append the **Posted with** footer for `SKILL_DIR` = `attach-assets` to the posted body.
## Path scheme
Each upload is written to the orphan branch under a directory named after the issue or PR number.
GitHub issues and PRs share one number sequence, so the number alone is unambiguous:
```
<number>/<filename>
```
If the same filename is uploaded twice to the same number, the second upload overwrites the first on the branch; give the file a distinct name instead.
## Workflow
```
Parse target ref -> (REPO, KIND=issues|pulls, NUMBER)
|
v
Verify files exist
|
v
Add a throwaway worktree on orphan branch `assets`
(existing branch checked out; new branch created empty with --orphan)
|
v
Copy files into <NUMBER>/ and git add + commit
|
v
Push to origin <ASSET_BRANCH>, then remove the worktree
|
v
Build markdown (image vs. link per extension)
|
v
Attach: comment (default) or append to body (--to-body)
|
v
Print raw URLs + branch paths
```
## Steps
### 1. Parse the target reference
```bash
TARGET="$1"; shift
FILES=("$@")
ASSET_BRANCH="${ASSET_BRANCH:-assets}" # override via --branch <name>
MODE="comment" # --to-body switches this to "body"
KIND_DEFAULT="issues" # --pr switches to "pulls"
# Parse --pr / --issue / --to-body / --branch out of FILES as needed.
```
Resolve `REPO`, `KIND`, `NUMBER`:
```bash
case "$TARGET" in
*github.com*)
REPO=$(printf '%s' "$TARGET" | sed -E 's#https?://github.com/([^/]+/[^/]+)(/.*)?#\1#')
KIND=$(printf '%s' "$TARGET" | grep -oE '/(issues|pull)/' | tr -d '/' | sed 's#^pull$#pulls#')
NUMBER=$(printf '%s' "$TARGET" | grep -oE '/(issues|pull)/[0-9]+' | grep -oE '[0-9]+$')
;;
*)
REPO=$(gh repo view --json nameWithOwner -q .nameWithOwner)
NUMBER="$TARGET"
KIND="$KIND_DEFAULT"
;;
esac
```
`KIND` is only used to choose the body endpoint; the asset path uses `NUMBER` alone.
### 2. Verify the files
```bash
for f in "${FILES[@]}"; do
[ -f "$f" ] || { echo "::error::not a file: $f"; exit 1; }
done
```
### 3. Stage a temporary worktree on the orphan branch
```bash
STAGE=$(mktemp -d)
if git ls-remote --exit-code --heads origin "$ASSET_BRANCH" >/dev/null 2>&1; then
git fetch origin "$ASSET_BRANCH" --quiet
git worktree add --detach --quiet "$STAGE" "origin/$ASSET_BRANCH" >/dev/null
else
git worktree add --no-checkout --detach --quiet "$STAGE" >/dev/null
git -C "$STAGE" checkout --orphan "$ASSET_BRANCH" >/dev/null
git -C "$STAGE" read-tree --empty # start the orphan with no staged files
fi
```
The worktree isolates all work from the user's current branch.
On an existing asset branch the asset tree is checked out so new files sit beside prior uploads; on a new branch an empty orphan is created (no shared history with `main`).
### 4. Place the files, commit, and pushFrom tomzx/agents, MIT.
More from tomzx/agents
- 0.639score
create-mermaid-visualization
tomzx
Create any Mermaid diagram (flowchart, sequence, class, state, ER, C4, architecture, gantt, mindmap, timeline, pie, sankey, and 20+ more) from a description…
SkillAFreshness: A★ 12Claude Code +9 - 0.639score
communication-guidelines
tomzx
Shared guidelines for writing concise, high-signal outbound communication the agent posts or drafts on the user's behalf, covering GitHub PR and issue…
SkillAFreshness: A★ 12Claude Code +9 - 0.634score
audit-maintainability
tomzx
Audit the codebase for maintainability, the ISO/IEC 25010 characteristic covering modularity, reusability, analyzability, modifiability, and testability.
SkillAFreshness: A★ 12Claude Code +9 - 0.634score
audit-attention
tomzx
Audit how your time splits between compounding and depreciating activities using the two-year test.
SkillAFreshness: A★ 12Claude Code +9 - 0.634score
audit-usability
tomzx
Audit the software's interfaces (CLI, API, and web UI) for usability, the ISO/IEC 25010 characteristic covering recognizability, learnability, operability…
SkillAFreshness: A★ 12Claude Code +9 - 0.634score
audit-functional-suitability
tomzx
Audit whether the software actually does what it should, completely and correctly.
SkillAFreshness: A★ 12Claude Code +9 - 0.634score
analyze-test-coverage
tomzx
Analyze a set of code changes (diff or files) and produce a structured test coverage report with three parts: introduced tests, change coverage, and uncovered…
SkillAFreshness: A★ 12Claude Code +9 - 0.634score
audit-compatibility
tomzx
Audit the codebase for compatibility, the ISO/IEC 25010 characteristic covering co-existence (running alongside other software without conflict) and…
SkillAFreshness: A★ 12Claude Code +9 - 0.634score
create-article
tomzx
Write, update, or revise a high-quality article given a target audience and relevant sources.
SkillAFreshness: A★ 12Claude Code +9 - 0.634score
arxiv-article
tomzx
Downloads an arXiv HTML article, converts it to markdown with pandoc, archives it, and returns a structured summary.
SkillAFreshness: A★ 12Claude Code +9 - 0.634score
arxiv-catchup
tomzx
Fetches new arXiv cs.AI papers published since the last processed date, processes each paper's HTML version via the arxiv-article skill, and advances the date…
SkillAFreshness: A★ 12Claude Code +9 - 0.634score
audit-performance-efficiency
tomzx
Audit the codebase for performance efficiency, the ISO/IEC 25010 characteristic covering time behavior, resource utilization, and capacity.
SkillAFreshness: A★ 12Claude Code +9
Signals
- Stars
- 12
- Forks
- 1
- Open issues
- 16
- Last commit (this folder)
- Oct 7, 2026 (21 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/tomzx/agents
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from tomzx
- 0.639score
create-mermaid-visualization
tomzx
Create any Mermaid diagram (flowchart, sequence, class, state, ER, C4, architecture, gantt, mindmap, timeline, pie, sankey, and 20+ more) from a description…
SkillAFreshness: A★ 12Claude Code +9 - 0.639score
communication-guidelines
tomzx
Shared guidelines for writing concise, high-signal outbound communication the agent posts or drafts on the user's behalf, covering GitHub PR and issue…
SkillAFreshness: A★ 12Claude Code +9 - 0.634score
audit-usability
tomzx
Audit the software's interfaces (CLI, API, and web UI) for usability, the ISO/IEC 25010 characteristic covering recognizability, learnability, operability…
SkillAFreshness: A★ 12Claude Code +9 - 0.634score
create-article
tomzx
Write, update, or revise a high-quality article given a target audience and relevant sources.
SkillAFreshness: A★ 12Claude Code +9 - 0.634score
analyze-test-coverage
tomzx
Analyze a set of code changes (diff or files) and produce a structured test coverage report with three parts: introduced tests, change coverage, and uncovered…
SkillAFreshness: A★ 12Claude Code +9 - 0.634score
arxiv-article
tomzx
Downloads an arXiv HTML article, converts it to markdown with pandoc, archives it, and returns a structured summary.
SkillAFreshness: A★ 12Claude Code +9
Cite this page
attach-assets skill. Agent Mart. https://agentmart.dev/skills/tomzx-attach-assets (last updated 2026-10-24)