import-git

import-git is a command for coding agents from TestAny-io/testany-agent-skills. It costs 30 tokens per session (667 once invoked), scanned A, original, MIT.

Komento Testany V2:n Git-tuontien hallintaan. Git on versionhallintajärjestelmä, ja OAuth on kirjautumistapa, jossa käyttöoikeus annetaan toiselle palvelulle.

In plain words
What is it for?
Git-palveluun yhdistämiseen, repositorioiden ja commit-versioiden selaamiseen, tuontien luomiseen ja synkronointiin sekä webhookien hallintaan.
Why use it?
Se kokoaa GitHub- ja GitLab-repositorion yhdistämisen, tiedostojen valinnan ja tuontien synkronoinnin samaan työnkulkuun.

Command

Part of the testany-bot plugin — 10 skills, 8 commands shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/testany-io/testany-agent-skills/import-git
Clone the repo
git clone --depth 1 https://github.com/TestAny-io/testany-agent-skills

Or install testany-bot, the plugin that ships this one along with the rest of its 10 skills, 8 commands.

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-git

README.md
[![agentmods](https://agentmods.dev/badge/commands/testany-io/testany-agent-skills/import-git.svg)](https://agentmods.dev/commands/testany-io/testany-agent-skills/import-git)
Your own site
<a href="https://agentmods.dev/commands/testany-io/testany-agent-skills/import-git"><img src="https://agentmods.dev/badge/commands/testany-io/testany-agent-skills/import-git.svg" alt="Measured on agentmods" height="20"></a>
Per session 30 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 667 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00030 $0.00667
Opus 5 $0.00015 $0.00333
Sonnet 5 $0.00006 $0.00133
Haiku 4.5 $0.00003 $0.00067

Measured 5d ago against content hash 69db9547cef4, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

import-git 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 5d 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.

plugins/testany-bot/commands/import-git.md · 51 lines

What it actually says

Testany V2 Git Import

驱动 Testany /api/v2/case/importHistory 全生命周期。不处理 v1 导入(v1 依赖界面交互,不在本 command 范围)。

使用方式

$ARGUMENTS

核心动作

  • 连接 Git 平台:GitHub / GitLab 的 OAuth 连接管理(initiate 返回 authorize_url,由用户浏览器完成)
  • 浏览仓库:列仓库 / 分支 / commit、浏览目录、预览文件
  • 创建导入:managed(后端镜像) / sync_link(用户显式选文件)两种模式
  • 同步 / 切换:preview → confirm 两阶段,覆盖 sync、switchCommit、switchMode、addFiles、sourceDeleted
  • 同步记录:列表与 per-file 详情
  • Webhook:启用 / 关闭 / 轮换 secret / 查看平台侧配置步骤

示例

/import-git 帮我连一下 GitHub
/import-git 在 owner/repo 上建一个 managed 导入,跟 main 分支
/import-git 这个导入现在有啥要 sync 的?
/import-git 切到 commit abc123 并确认
/import-git 查最近一次 sync 出啥错了
/import-git 把 A1B2-... 这个导入的 webhook 开起来
/import-git 轮换一下 webhook secret

重要边界

  • OAuth 必须浏览器完成:agent 只能给出 authorize_url,完成授权需用户在浏览器操作(frontend_return_uri 必填)
  • webhook_secret 只显示一次:首次启用 / regenerate 后必须立刻保存并在 Git 平台同步更新
  • current-phase 约束confirm_git_sync 仅 managed_import 可用;sync_link 的 binding 演化统一走 addFiles / sourceDeleted 关系流(managed_import 也支持这两条路径)
  • switchMode 只动 sync_mode:把 pinned_commit → latest不是 managed_import ↔ sync_link 的切换
  • idempotency_key 自动生成:不要手动传 UUID,除非跨多次调用显式去重

MCP Schema 资源

testany://schema/import-git 了解全量类型、枚举、典型流程和工具归类。

与其它 command 的关系

  • 导入产生的仍是 platform cases;若要真正执行还需 /pipeline 组装 + /trigger 配执行入口
  • 如需手工构建脚本包(而非从 Git 导入),用 /case-writing + /case
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. 5d ago First seen · 51 lines · 30 tokens per session scan A 69db9547cef4

Subscribe to this mod's changes

import-git is a command published in the GitHub repository TestAny-io/testany-agent-skills (80 stars, last pushed 8d ago), licensed MIT. It adds 30 tokens to every session and 667 once invoked, about $0.0002 per session on Opus 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-30.