import

import is a command for Claude Code from mdsakalu/agent-plugins. It costs 12 tokens per session (993 once invoked), scanned A, original, MIT.

A command that registers an existing Git checkout with a metarepo workspace system. A Git checkout is a local copy of a repository containing its history and branches.

In plain words
What is it for?
Use it to import a repository after checking its remote, branches, uncommitted changes, unpushed commits, and saved work-in-progress changes.
Why use it?
It avoids manually gathering repository details and helps detect conditions that could make the import unsafe or incomplete.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths; names the AskUserQuestion tool.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the workspace plugin — 13 commands, 3 hooks shipped together

Good fit Use it to import a repository after checking its remote, branches, uncommitted changes, unpushed commits, and saved work-in-progress changes.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add mdsakalu/agent-plugins
Claude Code
/plugin install workspace

Made for: Claude Code.

Or install workspace, the plugin that ships this one along with the rest of its 13 commands, 3 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for import

README.md
[![agentmods](https://agentmods.dev/badge/commands/mdsakalu/agent-plugins/import/github.svg)](https://agentmods.dev/commands/mdsakalu/agent-plugins/import)
Your own site
<a href="https://agentmods.dev/commands/mdsakalu/agent-plugins/import"><img src="https://agentmods.dev/badge/commands/mdsakalu/agent-plugins/import/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for import

Your own site · 80×15
<a href="https://agentmods.dev/commands/mdsakalu/agent-plugins/import"><img src="https://agentmods.dev/badge/commands/mdsakalu/agent-plugins/import.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 12 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 993 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00012 $0.00993
Opus 5.5 $0.00005 $0.00397
Sonnet 5.5 $0.00002 $0.00199
Haiku 4.5 $0.00001 $0.00099

Measured 1mo ago against content hash d19ee7a56417, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

import scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

workspace/commands/import.md · 63 lines

How it starts

The opening of the file, as written. The whole thing — 63 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Import an existing git checkout into the metarepo workspace system.

Resolve the metarepo path by reading ~/.claude/workspace-config.json and expanding ~ to $HOME.

The user's request: $ARGUMENTS

Steps

  1. Read ~/.claude/workspace-config.json to get the metarepo path. Expand ~ to $HOME.
  2. Validate the source path:
    • Expand ~ to $HOME in the provided path
    • Verify .git exists in the source directory
    • If .git is a file (not a directory), warn the user that the source is a git worktree — import may have unexpected results
    • Refuse if the source path is already inside <metarepo>/repos/
  3. Preflight the source — run git commands to collect information:
    • Remote URL: git -C <path> remote get-url origin (fallback to first available remote)
    • Current branch: git -C <path> branch --show-current
    • All local branches: git -C <path> branch --format='%(refname:short)'
    • Dirty state: git -C <path> status --porcelain
    • Unpushed commits per branch: git -C <path> log origin/<branch>..<branch> --oneline for each branch
    • Stash list: git -C <path> stash list — if non-empty, warn that stashes will NOT be imported
  4. Resolve repo mapping — parse the origin URL to determine org/repo, then check if repos/<name>/.repo.json exists:
    • If onboarded: verify the URL matches. If it doesn't match (fork scenario), warn the user.
    • If not onboarded: run bash ${CLAUDE_PLUGIN_ROOT}/scripts/workspaces/add-repo.sh <origin-url> to onboard it first.
  5. Ask the user via AskUserQuestion about import scope:
    • Current branch only
    • Select from branches (list them)
    • All local branches
    • Always skip the default branch (it maps to the existing trunk workspace).
  6. For each branch to import, propose a workspace name:
    • Branch prefix mapping: feature/* → epic-*, bugfix/*/hotfix/* → spike-*, pr-* passthrough
    • Otherwise: kebab-case the branch name, type = import
    • Ask the user via AskUserQuestion to confirm or override each workspace name
    • Check for collisions against existing repos/<repo>/ and notes/<repo>/ directories
  7. For each branch, run the import script:
    bash ${CLAUDE_PLUGIN_ROOT}/scripts/workspaces/import-workspace.sh \
      <repo> <name> --branch <branch> --source <path> \
      --type <type> [--purpose "<purpose>"] [--dirty] [--local-commits]
    
    Pass --dirty only for the current branch workspace when the source has dirty state (staged + unstaged changes). Pass --local-commits when the branch has unpushed commits (i.e., git log origin/<branch>..<branch> is non-empty).
  8. Run validation:
    bash ${CLAUDE_PLUGIN_ROOT}/scripts/workspaces/validate.sh --repo <repo>
    
  9. Report a summary of what was imported and suggest next steps:
    • /workspace:cd <repo>/<workspace> to switch to an imported workspace
    • /workspace:list to see all workspaces

Read the full file on GitHub · 63 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 63 lines · 12 tokens per session scan A d19ee7a56417

Subscribe to this mod's changes

import is a command published in the GitHub repository mdsakalu/agent-plugins (4 stars, last pushed 4mo ago), licensed MIT. It adds 12 tokens to every session and 993 once invoked, about $0.0000 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.