AGENT SKILL

workspace

暂无简介

License 许可
GPL-2.0
所属仓库
vjrasane/dotfiles
最近更新
2026-11-05
Stars
★ 0
Forks
0

02 资源文件 8

03 SKILL.md 正文

Workspace

Create a new jj workspace rooted alongside the current repo.

Instructions

  1. Determine the base:

    • If the user provided a bookmark or change ID, use that
    • Otherwise determine the default branch: jj config get revset-aliases.'trunk()' and extract the bookmark name from the output
    • If the config lookup fails, fall back to main
  2. Determine the workspace name:

    • If the user provided a feature name, slugify it: lowercase, dashes, no special chars
    • Otherwise suggest a name based on the task context or ask
    • If the workspace is for an existing ticket, prepend the ticket slug (its ID + name, kebab-cased) to the feature name (e.g. ticket "PROJ-123: Add auth middleware" → proj-123-add-auth-middleware)
    • Final directory: ws-<feature-name> (e.g. ws-add-auth-middleware, or ws-proj-123-add-auth-middleware for a ticket)
  3. Resolve paths:

    • Get the repo root: jj workspace root
    • The new workspace goes in the same parent directory: $(dirname $(jj workspace root))/ws-<feature-name>
  4. Create the workspace:

    jj workspace add ../ws-<feature-name>
    
  5. Set the working copy to the base change:

    cd ../ws-<feature-name>
    jj edit <base-change-or-bookmark>
    

    Then create a new empty change on top:

    jj new -m "<descriptive message>"
    
  6. Symlink gitignored root files (direnv, devenv, and *.local.* overrides) from the source repo root into the new workspace:

    SRC="$(jj workspace root)"
    DST="../ws-<feature-name>"
    git -C "$SRC" ls-files --others --ignored --exclude-standard -z \
      | grep -zZ -v '/' \
      | grep -zZ -e '\.local\.' -e '^\.envrc$' -e '^\.devenv' \
      | grep -zZ -v '^\.devenv\.flake\.nix$' \
      | while IFS= read -r -d '' f; do
          ln -s "$SRC/$f" "$DST/$f"
        done
    
    • git ls-files --others --ignored --exclude-standard enumerates gitignored files respecting .gitignore semantics (read-only).
    • grep -v '/' keeps root-level entries only, so the .devenv/ directory is skipped while .envrc, .devenv.local.nix, and any *.local.* file at root are symlinked.
    • .devenv.flake.nix is excluded — it is a generated artifact devenv rewrites in place; symlinking it would clobber the source. devenv regenerates it in the workspace on first shell entry.
  7. Create a bookmark on the new change using the same feature name:

    jj bookmark create <feature-name>
    
  8. Report: Print the workspace path and current jj log --limit 3 so the user can verify. Suggest the user cd into the workspace and start a new Claude session there.

04 同仓库更多 Skills

vjrasane
vjrasane/dotfiles

start-ticket

Kick off work on a Linear ticket end to end — file or look up the ticket, create an isolated jj workspace for it, move into that workspace, pull the ticket, and brief its scope. Use when the user wants to start working on a subject or an existing ticket, "start a ticket", "kick off LIN-123", or spin up a workspace from a ticket and begin.

Skill与智能体开发
★ 0
vjrasane
vjrasane/dotfiles

writing-assistant

Help improve and flesh out written text in markdown or plain text files. Use when the user wants writing feedback, style fixes, grammar corrections, or help expanding bullet points into prose. Does not write text from scratch.

内容创作者写作与文案资料检索与研究
★ 0
vjrasane
vjrasane/dotfiles

skill-writer

Guide users through creating Agent Skills for Claude Code. Use when the user wants to create, write, author, or design a new Skill, or needs help with SKILL.md files, frontmatter, or skill structure.

Skill与智能体开发
★ 0
vjrasane
vjrasane/dotfiles

review

Review code changes for quality, security, and best practices

★ 0
vjrasane
vjrasane/dotfiles

review-mr

Find the GitLab merge request for the current jj branch and run a code review on it. Use when the user wants to review the MR, review the merge request, review "my MR", or review the current branch's changes on GitLab.

代码审查Skill与智能体开发
★ 0
vjrasane
vjrasane/dotfiles

researcher

Research a topic by gathering information from web sources and local files. Use when the user asks to research, investigate, or deep-dive into a subject. Supports incremental research via a research.md file.

资料检索与研究
★ 0