Agent skill

Publish Skill

by Aperivue in Aperivue/medsci-skills

A skill your agent uses when turning a personal agent skill into an open-source, distributable one.

MITAuto-check passedResearch & Science

Install Publish Skill

skills CLI
$ npx skills add Aperivue/medsci-skills --skill publish-skill -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Aperivue/medsci-skills publish-skill --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Aperivue/medsci-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/publish-skill .claude/skills/publish-skill && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
publish-skill
GitHub stars
331
Token cost
~3.2k tokens
SKILL.md length
1,528 words
Files
7 (incl. scripts, references)
Skills in repo
54
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when turning a personal agent skill into an open-source, distributable one.

  • Works in 8 steps: Init and Identify Source → 5: Skill-Worthiness Gate → Originality Check → …
  • Turning a personal agent skill into an open-source
  • SKILL.md covers Phase 0: Init and Identify…, Phase 0.5: Skill-Worthiness Gate, Phase 1: Originality Check and Phase 2: PII De-identification…, plus 4 more sections
  • Runs Shell scripts from its folder; calls git and bash

What it does

Publish Skill is an agent skill from Aperivue/medsci-skills. Use when turning a personal agent skill into an open-source, distributable one. Runs a PII audit, generalizes personal details, checks licence compatibility, reviews cross-platform adapters and walks through packaging.

Its SKILL.md is about 3.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 9 other files, including scripts and reference files (for example `references/classroom-distribution.md`, `references/license-compatibility-matrix.md` and `references/pii-patterns.md`).

It sits in Research & Science. The repository describes itself as: Agent Skills for medical research — literature search, reporting-guideline & citation checks, statistics, publication figures, submission. Works with Claude Code, Codex, Cursor &… The licence is MIT.

When your agent uses it

  • Turning a personal agent skill into an open-source
  • Distributable one

Example prompts

  • “/publish-skill”

Requirements

  • Python 3
  • A Bash shell

Workflow steps

8 steps, taken from the step headings in SKILL.md.

  1. Init and Identify Source
  2. 5: Skill-Worthiness Gate
  3. Originality Check
  4. PII De-identification Audit
  5. Generalization
  6. License Compatibility Check
  7. Validate and Test
  8. Package and Commit

What it can do on your machine

Read from SKILL.md and the folder at commit 3b14ae2. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Shell), which the agent can run.

    Shell commands in SKILL.md call:

    • git
    • bash

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Publish Skill loads about 3.2k tokens when it runs, and up to ~5.5k if it reads all its reference files. Until then it costs about 58 tokens; SKILL.md has 1,528 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~58
When it runs · the whole SKILL.md, loaded when a task matches
~3.2k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~5.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from Aperivue/medsci-skills at commit 3b14ae2, republished under its MIT licence (© Aperivue). 1,528 words, ~3,216 tokens.

Download SKILL.mdSave it as .claude/skills/publish-skill/SKILL.md (or your agent's skills folder). This skill also uses 6 other files; get the full folder from GitHub.
name
publish-skill
description
Use when turning a personal agent skill into an open-source, distributable one. Runs a PII audit, generalizes personal details, checks licence compatibility, reviews cross-platform adapters and walks through packaging.
metadata.triggers
publish skill, distribute skill, open-source skill, package skill, universalize skill

Skill: publish-skill

Phase 0: Init and Identify Source

Required Inputs

Collect from the user:

  1. Source skill path: directory containing the personal skill (e.g., ~/.claude/skills/my-skill/ or ~/.agents/skills/my-skill/)
  2. Target package path: directory of the distributable package (e.g., ~/workspace/<your-package>/)
  3. Target license: license of the package — ask; offer MIT as the default, never assume it
Actions
  1. Read SKILL.md from the source skill directory
  2. Inventory all files recursively (ls -R)
  3. Classify skill type:
    • Standalone: self-contained skill with no agent delegation
    • Orchestrator: delegates to sub-agents (NOT suitable for distribution without refactoring)
    • Wrapper: thin wrapper around another tool/API
  4. Present inventory table to the user:
| File | Lines | Type | Notes |
|------|-------|------|-------|

Make every later fix on a working copy (<cleaned_skill_path> below) or in the target directory. NEVER modify the source skill in place, because it is the user's working original.

Gate: User confirms source skill and target package before proceeding.


Phase 0.5: Skill-Worthiness Gate

Before spending effort on PII scrubbing and generalization, confirm the workflow is worth distributing as a skill at all. Apply all three gates:

GateQuestionPass condition
UniquenessCould a competent user get the same result by searching the web for ~5 minutes, or by asking a general assistant with no skill installed?No
SpecificityDoes it encode a workflow, decision heuristic, constraint, or convention specific to this domain or a recurring task — rather than a generic code snippet or a standard-library example?Yes
EffortDid discovering it take real debugging, study design, operational effort, or a reviewer-anticipation lesson (a pitfall, a verification step, a domain convention)?Yes

Gate: Any "no" (or "yes" on the inverse) stops publication — recommend documentation or a memory note instead. If the value is real but the skill delegates to private agents, route through Phase 1's orchestrator finding (refactor to standalone first). Only a clear three-way pass proceeds.


Phase 1: Originality Check

Checks
  1. External source: Is this skill adapted from another package or author? Check for attribution headers, license blocks, or "based on" comments.
  2. Third-party content: Do any files in references/ come from external sources (published guidelines, textbooks, standards bodies)?
  3. Competitive sensitivity: Does the skill reveal proprietary business logic or competitive advantage that should remain private? Ask the user; never make this judgment call yourself.
Decision Matrix
FindingAction
Fully originalProceed to Phase 2
Adapted with compatible licenseAdd attribution header, proceed
Contains non-compatible third-party contentFlag for removal or URL reference conversion
Orchestrator with private agent referencesSTOP -- requires refactoring to standalone first
Competitive/proprietary logicSTOP -- not suitable for open-source

Phase 2: PII De-identification Audit

Zero tolerance: the skill must have exactly 0 PII matches before proceeding.

Pre-scan Setup

Before running, ask the user for everything unique to them that should also count as a PII hit:

  • Their name(s) in all languages and romanizations (a placeholder shape: <First Last>|<native-script name>)
  • Their institutional affiliation(s) (a placeholder shape: <Institution>|<Hospital>)
  • Any collaborator surnames that may appear in drafts or filenames

Combine the inputs into a single grep -E alternation pattern (pipe-separated).

Automated Scan

Run the bundled audit script. The first argument is the skill directory; the second is the user-specific alternation pattern from Pre-scan Setup.

bash
bash ${CLAUDE_SKILL_DIR}/scripts/audit_skill.sh --strict <source_skill_path> \
    "<First Last>|<native-script name>|<Institution>|<Hospital>"

The script scans ten categories, plus the user pattern:

  1. Hardcoded paths (/Users/<name>/, /home/<name>/, ~/Documents, ~/Desktop, ~/Downloads, ~/Projects)
  2. Email addresses (any address-shaped string)
  3. IP addresses / internal URLs (*.internal, *.local, *.corp)
  4. Institutional references (SNUH / AMC / SMC / KAIST / SNU / ASAN / MGH / UCSF / Mayo Clinic / Johns Hopkins / Samsung Medical / Severance / Asan Medical)
  5. Academic roles with names (professor <Surname>, Prof. <Surname>, Dr. <Surname>, PGY[0-9], <한글이름> 교수님)
  6. Language hardcoding ("in Korean", "한국어로", "in Japanese", "in Chinese")
  7. Location specifics (Seoul / Busan / Daegu / Tokyo / Beijing / Shanghai / Boston / Stanford and Korean variants)
  8. Blockquote dated precedent (> YYYY-MM-DD ... lines that reveal an internal review timeline)
  9. Author-style filenames (<Surname>{Year}_* pattern, e.g., <Surname>2025_<Journal>_Fig01.png; allow-list excludes generic tokens like Issue2024_, Sample2025_)
  10. Binary EXIF metadata (DOCX / PPTX / XLSX / PDF / PNG / JPG / TIFF — scanned via exiftool for home paths, email addresses and the user pattern, matched case-insensitively. If binaries are present and exiftool is not installed, the RESULT line reads INCOMPLETE and --strict exits 3)

Exit codes: 0 clean, 1 findings, 2 usage error / invalid user regex / a scan that could not run, 3 (--strict only) a check that could not run. Only exit 0 means clean.

Known limits: the Korean role branch (item 5) requires the honorific -nim suffix. A bare third-person mention (a Korean name followed by the role word without -nim) is not caught by this script, because separating it from job descriptions such as "advising professor" needs a stoplist that grep -E cannot express. Check such mentions by hand.

Cross-validation

For categories the script flags, also verify manually with the Grep tool against ${CLAUDE_SKILL_DIR}/references/pii-patterns.md. Pay particular attention to:

  • Names not in the extra-patterns argument (e.g., a co-author who appeared only in one early draft)
  • Domain-specific institutional acronyms (your institution may not be in the default list)
  • Project-specific identifiers like CK-NN, MA-NN, dated cohort names
Output Format

Present all findings in a remediation table:

| # | File:Line | Category | Match | Suggested Fix |
|---|-----------|----------|-------|---------------|

Gate: User reviews all findings. Fix each one in the working copy. Re-run the audit on the working copy. Proceed only when 0 hits are confirmed.


Phase 3: Generalization

Language
  • Replace: "in Korean" / "한국어로" / "Korean language" → "in the user's preferred language"
  • Replace: "communicate in [specific language]" → "Communicate with the user in their preferred language"
  • Keep: multilingual trigger keywords in the metadata.triggers field (or the target package's equivalent) (these aid discovery)
Role
  • Replace: "radiology researcher" → "medical researcher" (if the skill is domain-general)
  • Replace: "professor" / "fellow" → "researcher" or "user" (context-dependent)
  • Keep: domain-specific terms that define the skill's scope (e.g., "diagnostic accuracy" is fine)
Show full SKILL.md (597 more words)Show less
Paths
  • Replace: hardcoded absolute paths → ${CLAUDE_SKILL_DIR} for bundled reference files
  • Replace: ~/Documents/... → user-provided output directory
  • Keep: relative paths within the skill directory structure
Environment
  • Remove: assumptions about specific OS (macOS, Linux)
  • Remove: assumptions about specific editors or IDEs
  • Remove: references to personal infrastructure (agents, other personal skills)
  • Keep: tool requirements, described in the skill body (a prerequisites section). The schema has no tools: field, and allowed-tools pre-approves tools rather than describing them, so do not move requirements there
Interoperability
  • Check: does the skill reference other skills by name (e.g., "route to analyze-stats")?
  • If referenced skill exists in target package: keep the reference
  • If referenced skill does NOT exist in target package: make it optional with fallback instructions
Output

Show a unified diff of all generalization changes for user review.


Phase 4: License Compatibility Check

For each file in the skill's references/ and scripts/ directories:

  1. Check for license headers or declarations within the file
  2. Check for LICENSE files in the same directory
  3. If the file contains content from a known standard (reporting guidelines, clinical scores, etc.), identify the source and its license

Classify each file with ${CLAUDE_SKILL_DIR}/references/license-compatibility-matrix.md (written for an MIT target; it also lists common checklist and package licenses). Bundle compatible content with the attribution header or license notice it requires; convert non-compatible content to the matrix's URL Reference Pattern; mark GPL/LGPL tools as optional external dependencies; treat an unknown license as incompatible (remove, or get permission).

Output

Present license audit table:

| File | Source | License | Compatible? | Action |
|------|--------|---------|------------|--------|

Phase 5: Validate and Test

Structural Validation
  1. YAML frontmatter: Parse and verify the required fields (name and description per the Agent Skills spec, plus any field the target package's own validator requires)
  2. File references: Every ${CLAUDE_SKILL_DIR}/... path resolves to an actual file
  3. Script executability: Scripts in scripts/ have appropriate shebangs
  4. Line count: SKILL.md should be under 500 lines for optimal loading
  5. Description quality: Description should start with a verb and include trigger keywords
Final PII Re-check

Run audit_skill.sh --strict one final time on the cleaned skill. Must return exit code 0.

Cross-Platform Adapter Review

Check whether the skill can run in common desktop-agent environments:

PlatformCheck
Claude CodeNo hardcoded dependency on private ~/.claude paths unless documented.
CodexSKILL.md is self-contained and installable under ~/.agents/skills/.
CursorA short .cursor/rules/*.mdc adapter can point to the canonical SKILL.md.
WindowsCommands avoid Unix-only assumptions or provide PowerShell/Python alternatives.
macOS/LinuxShell examples use portable paths where possible.

If the package is intended for a workshop or classroom, read ${CLAUDE_SKILL_DIR}/references/classroom-distribution.md and follow it (direct-download ZIPs, release assets, classroom checklist).

README Entry Draft

Generate a table row matching the target package's README format:

markdown
| **{skill-name}** | {One-sentence description of what the skill does.} |
User Testing

Instruct the user to:

  1. Copy the cleaned skill to a test location: cp -r <cleaned_skill> ~/.claude/skills/<skill-name>
  2. Restart Claude Code
  3. Test the skill triggers by typing /<skill-name> or relevant trigger phrases
  4. Verify all phases work end-to-end on a sample input

Gate: User confirms testing is complete.


Phase 6: Package and Commit

Copy to Target Package
bash
cp -r <cleaned_skill_path> <target_package>/skills/<skill-name>/
Update README

Apply the README entry drafted in Phase 5:

  • Add row to the appropriate table (Available Now / Coming Soon)
  • Update pipeline diagram if the skill adds a new stage
  • Update skill count if mentioned in prose
Generate Commit Commands

Present the exact commands but do NOT auto-execute push:

bash
cd <target_package>
git add skills/<skill-name>/
git add README.md
git diff --cached   # User reviews
git commit -m "Add <skill-name>: <one-line description>"

Gate: User reviews git diff --cached and explicitly approves the commit. Push is always manual.

Post-Publish

Remind the user to:

  • Add the skill to any marketplace listings if applicable
  • Test installation from a clean clone: git clone <repo> && cp -r <repo>/skills/<skill-name> ~/.claude/skills/
  • For classroom distribution, finish the release steps in references/classroom-distribution.md.

© Aperivue, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 6 other files (scripts, references) in skills/publish-skill of Aperivue/medsci-skills.

  • SKILL.md
  • references/classroom-distribution.md
  • references/license-compatibility-matrix.md
  • references/pii-patterns.md
  • scripts/audit_skill.sh
  • skill.yml
  • tests/test_audit_skill.sh

Open the folder on GitHubat commit 3b14ae2

Compare with similar skills

Publish Skill next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Publish Skill compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Publish Skill this skillAperivue/medsci-skills331—~3.2kAutomated safety check: PassMIT
Hypothesis Generationspacering-net/codeg3.9k14 repos~3.6kAutomated safety check: NotesMIT
GitHub Deep Researchbytedance/deer-flow84k4 repos~1.3kAutomated safety check: PassMIT
Nature Paper CardYuan1z0825/nature-skills47k2 repos~2.1kAutomated safety check: PassApache-2.0
Content Research Writerweapp-tailwindcss/weapp-tailwindcss1.9k25 repos~3.5kAutomated safety check: PassMIT
Peer Reviewspacering-net/codeg3.9k17 repos~5.9kAutomated safety check: NotesMIT

Similar skills

  • Hypothesis Generation

    spacering-net/codeg

    Structured hypothesis formulation from observations. An agent skill from spacering-net/codeg.

    3.9k GitHub starsUsed in 14 repos~3.6k tokens
    Research & ScienceAuto-check: notes
  • GitHub Deep Research

    bytedance/deer-flow

    Researches a GitHub repository over four rounds using the GitHub API and web search, then writes a structured markdown report with timeline, metrics and Mermaid diagrams.

    84k GitHub starsUsed in 4 repos~1.3k tokens
    Research & ScienceAuto-check passed
  • Nature Paper Card

    Yuan1z0825/nature-skills

    Builds a structured deep-reading card for one scientific paper, covering methods, how experiments support claims, limitations and research ideas, with a script to prepare the source.

    47k GitHub starsUsed in 2 repos~2.1k tokens
    Research & ScienceAuto-check passed
  • Content Research Writer

    weapp-tailwindcss/weapp-tailwindcss

    Assists in writing high-quality content by conducting research, adding citations, improving hooks, iterating on outlines, and providing real-time feedback on each section.

    1.9k GitHub starsUsed in 25 repos~3.5k tokens
    Research & ScienceAuto-check passed
  • Peer Review

    spacering-net/codeg

    Structured manuscript/grant review with checklist-based evaluation.

    3.9k GitHub starsUsed in 17 repos~5.9k tokens
    Research & ScienceAuto-check: notes
  • Last30days

    mvanhorn/last30days-skill

    Research what people actually say about any topic in the last 30 days.

    64k GitHub stars~7.9k tokensUpdated yesterday
    Research & ScienceAuto-check: notes

More from Aperivue/medsci-skills

All 54 skills in this repo
  • Obsidian Paper Vault

    Aperivue/medsci-skills

    A skill your agent uses when turning a folder of research PDFs into Obsidian notes, even if Obsidian is not named.

    331 GitHub stars~1.6k tokensUpdated 4 days ago
    Auto-check passed
  • Clean Data

    Aperivue/medsci-skills

    A skill your agent uses when a clinical CSV/Excel dataset needs profiling and cleaning before analysis (missing values, outliers, duplicates, type mismatches).

    331 GitHub stars~2k tokensUpdated 4 days ago
    Auto-check passed
  • Design Study

    Aperivue/medsci-skills

    A skill your agent uses when checking a radiology or medical AI study design before drafting or submission.

    331 GitHub stars~3.9k tokensUpdated 4 days ago
    Auto-check passed
  • Fill Icmje Coi

    Aperivue/medsci-skills

    A skill your agent uses when each author needs an ICMJE Conflict of Interest disclosure form (coidisclosure.docx) for submission.

    331 GitHub stars~1.5k tokensUpdated 4 days ago
    Auto-check passed
  • Fill Protocol

    Aperivue/medsci-skills

    A skill your agent uses when an institutional Word form (.doc/.docx IRB protocol, ethics application, grant template) must be filled without breaking its styles, tables, fonts or page layout.

    331 GitHub stars~1.7k tokensUpdated 4 days ago
    Auto-check passed
  • Find Cohort Gap

    Aperivue/medsci-skills

    A skill your agent uses when looking for research topics a longitudinal cohort database can answer (NHIS, UK Biobank, an institutional EMR or registry).

    331 GitHub stars~2.9k tokensUpdated 4 days ago
    Auto-check passed

Questions about Publish Skill

What does Publish Skill do?

A skill your agent uses when turning a personal agent skill into an open-source, distributable one. Publish Skill is an agent skill from Aperivue/medsci-skills. Use when turning a personal agent skill into an open-source, distributable one.

When should I use Publish Skill?

Publish Skill fits situations like: turning a personal agent skill into an open-source; distributable one.

How do I install Publish Skill in Claude Code?

Run `npx skills add Aperivue/medsci-skills --skill publish-skill -a claude-code`. Or copy the skill folder (skills/publish-skill in Aperivue/medsci-skills) into .claude/skills/publish-skill in your project. Claude Code loads it when a task matches its description.

How do I install Publish Skill in Codex?

Run `npx skills add Aperivue/medsci-skills --skill publish-skill -a codex`. Or copy the skill folder (skills/publish-skill in Aperivue/medsci-skills) into .agents/skills/publish-skill in your project. Codex loads it when a task matches its description.

Can I use Publish Skill in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Aperivue/medsci-skills --skill publish-skill -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/publish-skill, .gemini/skills/publish-skill, .github/skills/publish-skill and .opencode/skills/publish-skill in your project.

What does Publish Skill need to run?

Going by SKILL.md and its folder, Publish Skill needs a shell for the scripts in its folder and the command-line tools its instructions call (git and bash). Our summary lists: Python 3; A Bash shell.

Does Publish Skill access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Publish Skill safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Publish Skill use?

Publish Skill is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Publish Skill use?

About 3.2k tokens (SKILL.md is roughly 13k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2.3k tokens, read only when the agent opens those files.

What are the alternatives to Publish Skill?

Skills that share tags, products or a category with Publish Skill: Hypothesis Generation (spacering-net/codeg, 3.9k stars), GitHub Deep Research (bytedance/deer-flow, 84k stars), Nature Paper Card (Yuan1z0825/nature-skills, 47k stars) and Content Research Writer (weapp-tailwindcss/weapp-tailwindcss, 1.9k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Publish Skill?

Aperivue (a GitHub organization) maintains it in Aperivue/medsci-skills, which has 331 GitHub stars. The repository holds 54 skills in this directory. The repository was last updated on October 5, 2026.

Source: Aperivue/medsci-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.