Skip to content
Back to search

patina

MarketplaceWorks with Claude CodeGitHub

patina — a deterministic, auditable AI-writing humanizer for Korean, English, Chinese, and Japanese.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/devswha--patina/badge.svg)](/listings/devswha--patina)

HTML

<a href="/listings/devswha--patina"><img src="/api/listings/devswha--patina/badge.svg" alt="findsafeskills safety rating" /></a>

Install

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

**Version: 9.1.0.** npm publication is a separate, explicitly authorized step. See [release channels](docs/integrations/release.md).

**Browser — nothing to install.** Open **[patina.vibetip.help](https://patina.vibetip.help/?lang=en&utm_source=github&utm_campaign=multilingual-20260907)** and paste text. Rewrites run server-side with the MPS/fidelity gates; API mode forwards your own key per request (never stored or logged).

[Hosted API (Pro)](docs/HTTP-API.md)

**Agent skill — paste this into Claude Code, Codex CLI, Cursor, or any agent:**

Install patina by following https://raw.githubusercontent.com/devswha/patina/main/INSTALLATION.md

**Agent skill — already using the skills.sh CLI:** `npx skills add devswha/patina` (installs the whole checkout for 75+ agents; entries on [skills.sh](https://skills.sh) come from install telemetry — no listing to submit). patina is a meaning-preserving editor (MPS-verified; KO·EN·ZH·JA), not a detector bypass.

Then use it:

/patina --lang en

[paste your text here]

**CLI — Node >= 18:**

npx patina-cli --lang en input.txt          # rewrite
npx patina-cli doctor                       # check backends and keys

A logged-in `codex`, `claude`, or `gemini` CLI works with no API key: add `--backend codex-cli`. Full install options: [INSTALLATION.md](INSTALLATION.md).

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

.claude-plugin/marketplace.json · Manifest · 32 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. {
  2. "$schema": "https://www.schemastore.org/claude-code-marketplace.json",
  3. "name": "patina",
  4. "description": "patina — a deterministic, auditable AI-writing humanizer for Korean, English, Chinese, and Japanese.",
  5. "owner": {
  6. "name": "devswha",
  7. "url": "https://github.com/devswha"
  8. },
  9. "plugins": [
  10. {
  11. "name": "patina",
  12. "source": "./",
  13. "version": "9.1.0",
  14. "description": "Strip the AI packaging, keep the meaning. Detect and rewrite AI writing patterns across KO/EN/ZH/JA with MPS/fidelity checks. Runs the root SKILL.md as the /patina skill.",
  15. "homepage": "https://github.com/devswha/patina",
  16. "repository": "https://github.com/devswha/patina",
  17. "license": "MIT",
  18. "keywords": [
  19. "humanize",
  20. "ai-writing",
  21. "ai-detector",
  22. "translationese",
  23. "korean",
  24. "english",
  25. "chinese",
  26. "japanese",
  27. "윤문",
  28. "번역투"
  29. ]
  30. }
  31. ]
  32. }
README.md · README · 149 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. <p align="center">
  2. <img src="assets/brand/patina-mark.svg" alt="patina mark" width="172">
  3. </p>
  4. <h1 align="center">patina</h1>
  5. <p align="center">
  6. <strong>Strip the AI packaging. Keep the meaning.</strong>
  7. </p>
  8. <p align="center">
  9. <a href="README_KR.md"><b>한국어</b></a> ·
  10. <a href="README_ZH.md"><b>中文</b></a> ·
  11. <a href="README_JA.md"><b>日本語</b></a> ·
  12. <b>English</b>
  13. </p>
  14. <p align="center">
  15. <a href="https://github.com/devswha/patina/actions/workflows/test.yml"><img alt="Tests" src="https://github.com/devswha/patina/actions/workflows/test.yml/badge.svg"></a>
  16. <a href="https://opensource.org/licenses/MIT"><img alt="License: MIT" src="https://img.shields.io/badge/License-MIT-yellow.svg"></a>
  17. <a href="#quick-start"><img alt="Skill: Claude Code | Codex | Cursor | OpenCode" src="https://img.shields.io/badge/Skill-Claude%20Code%20%7C%20Codex%20%7C%20Cursor%20%7C%20OpenCode-blueviolet"></a>
  18. <a href="https://github.com/devswha/patina"><img alt="Languages: KO | EN | ZH | JA" src="https://img.shields.io/badge/Languages-KO%20%7C%20EN%20%7C%20ZH%20%7C%20JA-green"></a>
  19. <a href="CHANGELOG.md"><img alt="Version" src="https://img.shields.io/badge/version-9.1.0-blue"></a>
  20. </p>
  21. <p align="center">
  22. <a href="https://patina.vibetip.help/?lang=en&amp;utm_source=github&amp;utm_campaign=multilingual-20260907"><b>Try it in the browser — no install</b></a>
  23. </p>
  24. **An illustrative email edit**
  25. **Before**
  26. > I'm writing to let you know that the launch review is scheduled for Friday at 2 p.m. The draft is 6 pages long, and two questions about pricing are still open.
  27. **After**
  28. > The launch review is Friday at 2 p.m. The draft has 6 pages and two open pricing questions.
  29. A curated excerpt from [the English email showcase](playground/examples/en.js). This is a synthetic example, not a live run or a measured score.
  30. patina is a deterministic, pattern-based humanizer for Korean, English, Chinese, and Japanese. It finds AI-sounding phrasing and rewrites it **without changing the claim, numbers, polarity, or causation** — built for allowed AI-assisted drafting, not for evading detectors.
  31. - **Auditable, not a black box** — 189 named patterns drive every edit; `--diff` shows exactly what changed and why.
  32. - **Meaning verified on the web** — web gates each rewrite with MPS/fidelity floors, rejecting drift; CLI `--verify` and `/patina --strict` add checks.
  33. - **Three independent axes** — Document Type owns genre, Persona owns voice, Register owns delivery. Omit any axis to preserve the source.
  34. - **Every surface** — agent skill (Claude Code · Codex · Cursor · OpenCode), Node CLI, and a [browser playground](https://patina.vibetip.help/?lang=en&utm_source=github&utm_campaign=multilingual-20260907).
  35. - **Honest about limits** — scores are editing signals, not authorship proof; our own [pre-registered study](docs/research/2026-rewrite-efficacy-study1.md) publishes where rewriting fails alongside where it works.
  36. ## Quick Start
  37. **Version: 9.1.0.** npm publication is a separate, explicitly authorized step. See [release channels](docs/integrations/release.md).
  38. **Browser — nothing to install.** Open **[patina.vibetip.help](https://patina.vibetip.help/?lang=en&utm_source=github&utm_campaign=multilingual-20260907)** and paste text. Rewrites run server-side with the MPS/fidelity gates; API mode forwards your own key per request (never stored or logged).
  39. [Hosted API (Pro)](docs/HTTP-API.md)
  40. **Agent skill — paste this into Claude Code, Codex CLI, Cursor, or any agent:**
  41. ```text
  42. Install patina by following https://raw.githubusercontent.com/devswha/patina/main/INSTALLATION.md
  43. ```
  44. **Agent skill — already using the skills.sh CLI:** `npx skills add devswha/patina` (installs the whole checkout for 75+ agents; entries on [skills.sh](https://skills.sh) come from install telemetry — no listing to submit). patina is a meaning-preserving editor (MPS-verified; KO·EN·ZH·JA), not a detector bypass.
  45. Then use it:
  46. ```text
  47. /patina --lang en
  48. [paste your text here]
  49. ```
  50. **CLI — Node >= 18:**
  51. ```bash
  52. npx patina-cli --lang en input.txt # rewrite
  53. npx patina-cli doctor # check backends and keys
  54. ```
  55. A logged-in `codex`, `claude`, or `gemini` CLI works with no API key: add `--backend codex-cli`. Full install options: [INSTALLATION.md](INSTALLATION.md).
  56. ## Three Independent Axes
  57. patina does not infer one axis from another. Omit Persona and Register to keep the source voice and register.
  58. | Axis | Controls | Does not control | Select with |
  59. |---|---|---|---|
  60. | **Document Type** | Genre, purpose, structural conventions, pattern policy | Voice, casual/professional delivery, meaning floors | `--document-type` · config `document-type` · Playground "Document Type" |
  61. | **Persona** | Reusable voice fingerprint: vocabulary, rhythm, explanation habits | Genre, pattern policy, register, meaning floors | `--persona` · config `persona` · Playground "Persona" |
  62. | **Register** | `casual` or `professional` delivery | Genre, persona identity, pattern policy | `--register` · config `register` · Playground "Register" |
  63. Meaning preservation is the outer guard; an explicit value never fills an omitted axis.
  64. ## Commands
  65. ```bash
  66. patina input.txt # rewrite with defaults
  67. patina --audit input.txt # detect patterns only
  68. patina --score --offline --exit-on 30 input.txt # deterministic CI gate, no API key
  69. patina --diff input.txt # pattern-by-pattern changes
  70. patina --verify input.txt # rewrite + MPS/fidelity floor check
  71. patina --document-type email --register professional input.txt
  72. patina persona new my-voice --from-sample past-posts.txt # learn a reusable voice
  73. patina --persona my-voice draft.md
  74. patina --batch docs/*.md --outdir cleaned/
  75. ```
  76. `patina --help` prints the full flag list. CI wrapper for GitHub Actions: [devswha/patina-action](https://github.com/devswha/patina-action) — plus [pre-commit](docs/integrations/pre-commit.md), [Docker](docs/integrations/docker.md), and [release](docs/integrations/release.md) guides.
  77. Editor clients: the VS Code, Obsidian and Gmail preview clients are retired. See the [historical record](docs/integrations/editors.md).
  78. Model evidence: [writing/scoring guide (Korean)](docs/research/model-guide-20260905.md), [rewrite confirmation](docs/research/model-rewrite-confirmation-20260905.md), and [live scoring diagnostics](docs/benchmarks/live-rebaseline-20260905.md).
  79. Project config lives in `.patina.yaml`:
  80. ```yaml
  81. version: "9.1.0"
  82. language: ko # ko | en | zh | ja
  83. document-type: default # genre/purpose + pattern policy
  84. persona: # optional reusable voice; omit to preserve source
  85. register: # casual | professional; omit to preserve source
  86. ```
  87. ## Facts
  88. | | |
  89. |---|---|
  90. | **189 patterns** | 41 rewrite-capable (KO) / 38 (EN) / 37 (ZH, JA) + 9 score-only viral-hook per language — see the full 189-pattern catalog in [PATTERNS.md](docs/PATTERNS.md) |
  91. | **Modes** | rewrite · verify · audit · score · diff |
  92. | **Calibration** | 67.3% editing-hotspot catch [63.5–71.0%] across GPT-5.5 / Claude Sonnet 4.6 / Gemini 2.5 Pro (n=600, KO+EN); 16.0% false positives [11.6–21.7%] on KO+EN human controls (n=200) |
  93. | **License** | MIT |
  94. Scores are editing signals with false positives and false negatives, not proof of authorship. See [Ethics](docs/ETHICS.md).
  95. ## Documentation
  96. [Historical English playground recording](https://raw.githubusercontent.com/devswha/patina/main/assets/demo/patina-demo-live-en.gif) · [recording context](assets/demo/README.md). The recording is an earlier run, separate from the curated examples above.
  97. - [Cookbook](docs/COOKBOOK.md) — common recipes · [CLI contract](docs/CLI.md) — flags, gates, exit codes
  98. - [Before/After gallery](docs/EXAMPLES.md) ([한국어](docs/EXAMPLES_KR.md)) · [Pattern catalog](docs/PATTERNS.md)
  99. - [Architecture](docs/ARCHITECTURE.md) · [Configuration & authentication](docs/AUTHENTICATION.md)
  100. - [Benchmarks](docs/benchmarks/latest.md) · [Research](docs/research/2026-rewrite-efficacy-study1.md) · [FAQ](docs/FAQ.md) ([한국어](docs/FAQ_KR.md))
  101. - [Contributing](CONTRIBUTING.md) ([한국어](CONTRIBUTING_KR.md)) · [Changelog](CHANGELOG.md)
  102. To submit a pattern, use [CONTRIBUTING.md](CONTRIBUTING.md). Open a [pattern proposal](https://github.com/devswha/patina/issues/new?template=pattern_proposal.yml) ([`.github/ISSUE_TEMPLATE/pattern_proposal.yml`](.github/ISSUE_TEMPLATE/pattern_proposal.yml)), then add the pack from the template in `patterns/{lang}-*.md`. See [pattern of the week](docs/community/pattern-of-the-week.md) for one worked pair.
  103. ## License
  104. MIT. See [LICENSE](LICENSE) and [NOTICE](NOTICE). Inspired by [oh-my-zsh](https://github.com/ohmyzsh/ohmyzsh), [Wikipedia's "Signs of AI writing"](https://en.wikipedia.org/wiki/Wikipedia:Signs_of_AI_writing), and [blader/humanizer](https://github.com/blader/humanizer).
install.sh · Bundled script · 324 lines · 1 finding marked
  1. #!/bin/sh
  2. # install.sh - Install patina for Claude Code and other AI agents
  3. # Usage: curl -fsSL https://raw.githubusercontent.com/devswha/patina/main/install.sh | bash
    • Note: Pipes a downloaded script directly into a shell (curl | sh / wget | bash)
    • Line 3 on GitHub
  4. set -e
  5. # Agent targets (set env vars to enable; all enabled by default if none specified)
  6. INSTALL_CLAUDE="${INSTALL_CLAUDE:-true}"
  7. INSTALL_CODEX="${INSTALL_CODEX:-true}"
  8. INSTALL_CURSOR="${INSTALL_CURSOR:-true}"
  9. INSTALL_OPCODE="${INSTALL_OPCODE:-true}"
  10. CLAUDE_SKILLS_DIR="${HOME}/.claude/skills"
  11. CODEX_SKILLS_DIR="${HOME}/.codex/skills"
  12. CURSOR_RULES_DIR="${HOME}/.cursor/rules"
  13. OPCODE_SKILLS_DIR="${HOME}/.config/opencode/skills"
  14. PATINA_DIR="${CLAUDE_SKILLS_DIR}/patina"
  15. REPO_URL="https://github.com/devswha/patina.git"
  16. # Pin the installed checkout to a concrete ref. If unset, resolve the current
  17. # remote HEAD once and check out that commit instead of tracking main.
  18. PATINA_REF="${PATINA_REF:-}"
  19. PATINA_REPO_READY=""
  20. # Colors (only when outputting to a terminal)
  21. if [ -t 1 ] && [ -z "${NO_COLOR:-}" ]; then
  22. GREEN='\033[0;32m'
  23. YELLOW='\033[0;33m'
  24. RED='\033[0;31m'
  25. BOLD='\033[1m'
  26. RESET='\033[0m'
  27. else
  28. GREEN=''
  29. YELLOW=''
  30. RED=''
  31. BOLD=''
  32. RESET=''
  33. fi
  34. info() {
  35. printf "%b\n" "${BOLD}$1${RESET}"
  36. }
  37. warn() {
  38. printf "%b\n" "${YELLOW}$1${RESET}"
  39. }
  40. success() {
  41. printf "%b\n" "${GREEN}$1${RESET}"
  42. }
  43. error() {
  44. printf "%b\n" "${RED}Error: $1${RESET}" >&2
  45. exit 1
  46. }
  47. is_cursor_product_rule() {
  48. awk '
  49. NR == 1 && $0 == "---" { next }
  50. NR == 2 && $0 == "description: Apply Patina product instructions when humanizing text." { next }
  51. NR == 3 && $0 == "alwaysApply: false" { next }
  52. NR == 4 && $0 == "---" { next }
  53. NR == 5 && $0 == "" { next }
  54. NR == 6 && $0 == "<!-- patina-cursor-product-adapter -->" { found = 1; exit 0 }
  55. { exit 1 }
  56. END { if (!found) exit 1 }
  57. ' "$1"
  58. }
  59. cursor_target_replaceable() {
  60. target="$1"
  61. if [ ! -e "${target}" ] && [ ! -L "${target}" ]; then
  62. return 0
  63. fi
  64. if [ -L "${target}" ]; then
  65. return 1
  66. fi
  67. [ -f "${target}" ] && is_cursor_product_rule "${target}"
  68. }
  69. # Check prerequisites
  70. command -v git >/dev/null 2>&1 || error "git is not installed. Please install git first."
  71. resolve_install_ref() {
  72. if [ -n "${PATINA_REF}" ]; then
  73. printf "%s" "${PATINA_REF}"
  74. return 0
  75. fi
  76. git ls-remote "${REPO_URL}" HEAD 2>/dev/null | awk 'NR == 1 { print $1 }'
  77. }
  78. checkout_install_ref() {
  79. dir="$1"
  80. ref="$2"
  81. set +e
  82. (
  83. cd "${dir}"
  84. git fetch --depth=1 origin "${ref}" || exit 10
  85. git checkout --detach FETCH_HEAD >/dev/null 2>&1 || exit 11
  86. )
  87. rc="$?"
  88. set -e
  89. if [ "${rc}" = "10" ]; then
  90. error "Failed to fetch patina ref '${ref}'. Use PATINA_REF=<tag-or-full-sha>."
  91. fi
  92. if [ "${rc}" = "11" ]; then
  93. error "Failed to check out patina ref '${ref}'."
  94. fi
  95. if [ "${rc}" != "0" ]; then
  96. error "Failed to install patina ref '${ref}'."
  97. fi
  98. }
  99. # Runtime readiness belongs to this checkout, not a dependency marker or a
  100. # globally linked CLI. Prepare dependencies only when actual startup fails.
  101. install_runtime_deps() {
  102. info "Skill files installed at ${PATINA_DIR}."
  103. info "Backend readiness: not checked. Installation does not select or authenticate a backend."
  104. command -v node >/dev/null 2>&1 || error "Runtime not ready: install Node.js >=18.1.0 and rerun the installer."
  105. if ! node -e 'const [major, minor] = process.versions.node.split(".").map(Number); process.exit(major > 18 || (major === 18 && minor >= 1) ? 0 : 1)'; then
  106. error "Runtime not ready: Node.js >=18.1.0 is required."
  107. fi
  108. if ! node "${PATINA_DIR}/bin/patina.js" --version >/dev/null 2>&1; then
  109. command -v npm >/dev/null 2>&1 || error "Runtime not ready: npm is required to prepare dependencies in ${PATINA_DIR}. Install npm and rerun the installer."
  110. info "Installing patina runtime dependencies from the lockfile..."
  111. if ! ( cd "${PATINA_DIR}" && npm ci --omit=dev --no-audit --no-fund ); then
  112. error "Runtime not ready: dependency installation failed in ${PATINA_DIR}. Resolve the npm error and rerun the installer."
  113. fi
  114. node "${PATINA_DIR}/bin/patina.js" --version || error "Runtime not ready: the installed CLI failed to start after dependency preparation."
  115. fi
  116. success "Local CLI runtime ready: node \"${PATINA_DIR}/bin/patina.js\" --version"
  117. }
  118. # Materialize Cursor's user rule from the canonical product skill. Cursor's
  119. # @file references are project-relative, so a symlinked adapter cannot safely
  120. # point back to this checkout from ~/.cursor/rules. Keep the Cursor frontmatter
  121. # separate, record the absolute installed skill paths, and copy the current
  122. # SKILL.md body verbatim.
  123. install_cursor_rule() {
  124. source="$1"
  125. target="$2"
  126. skill_dir="$(dirname "${source}")"
  127. helper="${skill_dir}/bin/patina-skill.js"
  128. tmp="${target}.tmp.$$"
  129. if ! cursor_target_replaceable "${target}"; then
  130. error "Cursor target exists but was not installed by patina: ${target}."
  131. fi
  132. if ! {
  133. printf '%s\n' \
  134. '---' \
  135. 'description: Apply Patina product instructions when humanizing text.' \
  136. 'alwaysApply: false' \
  137. '---' \
  138. '' \
  139. '<!-- patina-cursor-product-adapter -->' \
  140. 'Patina product integration context (generated from the canonical skill):' \
  141. "- Canonical product instructions: \"${source}\"" \
  142. "- Patina skill directory: \"${skill_dir}\"" \
  143. "- CLI-first helper: \`node \"${helper}\" --input <source-file> ...\`" \
  144. '- This generated Cursor adapter is not the canonical skill file. Resolve any skill-directory references using the absolute path above.'
  145. printf '%s' ''
  146. awk '
  147. NR == 1 && $0 == "---" {
  148. in_frontmatter = 1
  149. saw_frontmatter = 1
  150. next
  151. }
  152. in_frontmatter && $0 == "---" {
  153. in_frontmatter = 0
  154. saw_end = 1
  155. next
  156. }
  157. in_frontmatter { next }
  158. { print }
  159. END {
  160. if (!saw_frontmatter || !saw_end) exit 1
  161. }
  162. ' "${source}"
  163. } > "${tmp}"; then
  164. rm -f "${tmp}"
  165. error "Cursor product instructions could not be generated from ${source}."
  166. fi
  167. if ! cursor_target_replaceable "${target}"; then
  168. rm -f "${tmp}"
  169. error "Cursor target changed and was not installed by patina: ${target}."
  170. fi
  171. if ! mv -f "${tmp}" "${target}"; then
  172. rm -f "${tmp}"
  173. error "Cursor product instructions could not be installed at ${target}."
  174. fi
  175. }
  176. # Ensure the patina repo checkout exists at PATINA_DIR (clone or update once).
  177. # Idempotent and tool-neutral so any single agent can be installed on its own,
  178. # without requiring Claude Code to be installed first.
  179. ensure_patina_repo() {
  180. if [ -n "${PATINA_REPO_READY}" ]; then
  181. return 0
  182. fi
  183. if [ -d "${PATINA_DIR}/.git" ]; then
  184. info "Updating existing patina installation..."
  185. checkout_install_ref "${PATINA_DIR}" "${INSTALL_REF}"
  186. else
  187. if [ -d "${PATINA_DIR}" ]; then
  188. error "${PATINA_DIR} exists but is not a git repo. Remove it and try again."
  189. fi
  190. mkdir -p "$(dirname "${PATINA_DIR}")"
  191. info "Cloning patina at ${INSTALL_REF}..."
  192. git clone --depth=1 "${REPO_URL}" "${PATINA_DIR}" || error "Failed to clone patina. Check your network connection."
  193. checkout_install_ref "${PATINA_DIR}" "${INSTALL_REF}"
  194. fi
  195. install_runtime_deps
  196. PATINA_REPO_READY=1
  197. }
  198. INSTALL_REF="$(resolve_install_ref)"
  199. if [ -z "${INSTALL_REF}" ]; then
  200. error "Failed to resolve patina install ref. Set PATINA_REF=<tag-or-full-sha> and retry."
  201. fi
  202. # --- Claude Code ---
  203. if [ "${INSTALL_CLAUDE}" = "true" ]; then
  204. info "Installing for Claude Code..."
  205. ensure_patina_repo
  206. success "Claude Code: skill files installed"
  207. else
  208. warn "Skipping Claude Code installation (INSTALL_CLAUDE=false)"
  209. fi
  210. # --- Codex CLI ---
  211. if [ "${INSTALL_CODEX}" = "true" ]; then
  212. info "Installing for Codex CLI..."
  213. if [ ! -d "${CODEX_SKILLS_DIR}" ]; then
  214. info "Creating ${CODEX_SKILLS_DIR}..."
  215. mkdir -p "${CODEX_SKILLS_DIR}"
  216. fi
  217. ensure_patina_repo
  218. ln -snf "${PATINA_DIR}" "${CODEX_SKILLS_DIR}/patina"
  219. success "Codex: /patina linked to ${CODEX_SKILLS_DIR}"
  220. else
  221. warn "Skipping Codex installation (INSTALL_CODEX=false)"
  222. fi
  223. # --- Cursor ---
  224. if [ "${INSTALL_CURSOR}" = "true" ]; then
  225. info "Installing for Cursor..."
  226. if [ ! -d "${CURSOR_RULES_DIR}" ]; then
  227. info "Creating ${CURSOR_RULES_DIR}..."
  228. mkdir -p "${CURSOR_RULES_DIR}"
  229. fi
  230. # Generate the product adapter from the canonical skill, not the
  231. # repository-development Cursor rule.
  232. ensure_patina_repo
  233. if [ ! -f "${PATINA_DIR}/SKILL.md" ]; then
  234. error "Cursor product instructions not found at ${PATINA_DIR}/SKILL.md."
  235. fi
  236. install_cursor_rule "${PATINA_DIR}/SKILL.md" "${CURSOR_RULES_DIR}/patina.mdc"
  237. success "Cursor: product rules installed at ${CURSOR_RULES_DIR}/patina.mdc"
  238. else
  239. warn "Skipping Cursor installation (INSTALL_CURSOR=false)"
  240. fi
  241. # --- OpenCode / Sisyphus ---
  242. if [ "${INSTALL_OPCODE}" = "true" ]; then
  243. info "Installing for OpenCode / Sisyphus..."
  244. if [ ! -d "${OPCODE_SKILLS_DIR}" ]; then
  245. info "Creating ${OPCODE_SKILLS_DIR}..."
  246. mkdir -p "${OPCODE_SKILLS_DIR}"
  247. fi
  248. ensure_patina_repo
  249. # OpenCode loads the linked checkout's SKILL.md as the skill interface
  250. ln -snf "${PATINA_DIR}" "${OPCODE_SKILLS_DIR}/patina"
  251. success "OpenCode: skill linked to ${OPCODE_SKILLS_DIR}/patina"
  252. else
  253. warn "Skipping OpenCode installation (INSTALL_OPCODE=false)"
  254. fi
  255. # Done
  256. printf "\n"
  257. if [ -n "${PATINA_REPO_READY}" ]; then
  258. success "✓ patina skill files installed; local CLI runtime ready. Backend readiness not checked."
  259. else
  260. info "No agent targets enabled; nothing installed and runtime/backend readiness not checked."
  261. fi
  262. info " If it saves you edits, a star helps others find it → https://github.com/devswha/patina"
  263. printf "\n"
  264. info "Usage:"
  265. if [ "${INSTALL_CLAUDE}" = "true" ]; then
  266. printf " Claude Code:\n"
  267. printf " /patina Humanize Korean text\n"
  268. printf " /patina --lang en Humanize English text\n"
  269. fi
  270. if [ "${INSTALL_CODEX}" = "true" ]; then
  271. printf " Codex CLI:\n"
  272. printf " /patina Humanize Korean text\n"
  273. printf " /patina --lang en Humanize English text\n"
  274. fi
  275. if [ "${INSTALL_CURSOR}" = "true" ]; then
  276. printf " Cursor:\n"
  277. printf " Product rules loaded from ~/.cursor/rules/patina.mdc\n"
  278. fi
  279. if [ "${INSTALL_OPCODE}" = "true" ]; then
  280. printf " OpenCode / Sisyphus:\n"
  281. printf " Skill loaded from ~/.config/opencode/skills/patina\n"
  282. printf " Instructions: SKILL.md\n"
  283. fi
  284. printf "\n"
  285. info "Environment variables to control installation:"
  286. printf " PATINA_REF=<tag-or-full-sha> Pin installed checkout (default: resolved remote HEAD SHA)\n"
  287. printf " INSTALL_CLAUDE=true|false (default: true)\n"
  288. printf " INSTALL_CODEX=true|false (default: true)\n"
  289. printf " INSTALL_CURSOR=true|false (default: true)\n"
  290. printf " INSTALL_OPCODE=true|false (default: true)\n"
  291. printf "\n"
uninstall.sh · Bundled script · 135 lines · 1 finding marked
  1. #!/bin/sh
  2. # uninstall.sh - Remove patina from Claude Code and other AI agents
  3. # Usage: curl -fsSL https://raw.githubusercontent.com/devswha/patina/main/uninstall.sh | bash
    • Note: Pipes a downloaded script directly into a shell (curl | sh / wget | bash)
    • Line 3 on GitHub
  4. #
  5. # This only removes what install.sh creates. If you installed via the Claude Code
  6. # plugin marketplace (/plugin install patina@patina), uninstall with:
  7. # /plugin uninstall patina@patina
  8. set -e
  9. # Agent targets (set env vars to disable individually; all enabled by default)
  10. UNINSTALL_CLAUDE="${UNINSTALL_CLAUDE:-true}"
  11. UNINSTALL_CODEX="${UNINSTALL_CODEX:-true}"
  12. UNINSTALL_CURSOR="${UNINSTALL_CURSOR:-true}"
  13. UNINSTALL_OPCODE="${UNINSTALL_OPCODE:-true}"
  14. CLAUDE_SKILLS_DIR="${HOME}/.claude/skills"
  15. CODEX_SKILLS_DIR="${HOME}/.codex/skills"
  16. CURSOR_RULES_DIR="${HOME}/.cursor/rules"
  17. OPCODE_SKILLS_DIR="${HOME}/.config/opencode/skills"
  18. PATINA_DIR="${CLAUDE_SKILLS_DIR}/patina"
  19. # Colors (only when outputting to a terminal)
  20. if [ -t 1 ] && [ -z "${NO_COLOR:-}" ]; then
  21. BOLD="$(printf '\033[1m')"
  22. GREEN="$(printf '\033[32m')"
  23. YELLOW="$(printf '\033[33m')"
  24. RED="$(printf '\033[31m')"
  25. RESET="$(printf '\033[0m')"
  26. else
  27. BOLD=""
  28. GREEN=""
  29. YELLOW=""
  30. RED=""
  31. RESET=""
  32. fi
  33. info() {
  34. printf "%b\n" "${BOLD}$1${RESET}"
  35. }
  36. warn() {
  37. printf "%b\n" "${YELLOW}$1${RESET}"
  38. }
  39. success() {
  40. printf "%b\n" "${GREEN}$1${RESET}"
  41. }
  42. is_cursor_product_rule() {
  43. awk '
  44. NR == 1 && $0 == "---" { next }
  45. NR == 2 && $0 == "description: Apply Patina product instructions when humanizing text." { next }
  46. NR == 3 && $0 == "alwaysApply: false" { next }
  47. NR == 4 && $0 == "---" { next }
  48. NR == 5 && $0 == "" { next }
  49. NR == 6 && $0 == "<!-- patina-cursor-product-adapter -->" { found = 1; exit 0 }
  50. { exit 1 }
  51. END { if (!found) exit 1 }
  52. ' "$1"
  53. }
  54. error() {
  55. printf "%b\n" "${RED}$1${RESET}" >&2
  56. exit 1
  57. }
  58. REMOVED=0
  59. # --- Codex CLI (symlink) ---
  60. if [ "${UNINSTALL_CODEX}" = "true" ]; then
  61. TARGET="${CODEX_SKILLS_DIR}/patina"
  62. if [ -L "${TARGET}" ]; then
  63. rm -f "${TARGET}"
  64. success "Codex: removed ${TARGET}"
  65. REMOVED=1
  66. elif [ -e "${TARGET}" ]; then
  67. warn "Codex: ${TARGET} exists but is not a symlink; leaving it untouched."
  68. fi
  69. fi
  70. # --- Cursor (generated rule) ---
  71. if [ "${UNINSTALL_CURSOR}" = "true" ]; then
  72. TARGET="${CURSOR_RULES_DIR}/patina.mdc"
  73. if [ -L "${TARGET}" ]; then
  74. warn "Cursor: ${TARGET} is a symlink; leaving it untouched."
  75. elif [ -f "${TARGET}" ] && is_cursor_product_rule "${TARGET}"; then
  76. rm -f "${TARGET}"
  77. success "Cursor: removed ${TARGET}"
  78. REMOVED=1
  79. elif [ -e "${TARGET}" ]; then
  80. warn "Cursor: ${TARGET} exists but was not installed by patina; leaving it untouched."
  81. fi
  82. fi
  83. # --- OpenCode / Sisyphus (symlink) ---
  84. if [ "${UNINSTALL_OPCODE}" = "true" ]; then
  85. TARGET="${OPCODE_SKILLS_DIR}/patina"
  86. if [ -L "${TARGET}" ]; then
  87. rm -f "${TARGET}"
  88. success "OpenCode: removed ${TARGET}"
  89. REMOVED=1
  90. elif [ -e "${TARGET}" ]; then
  91. warn "OpenCode: ${TARGET} exists but is not a symlink; leaving it untouched."
  92. fi
  93. fi
  94. # --- Claude Code (cloned repo) ---
  95. # Remove last so the symlinks above are cleared before their target disappears.
  96. if [ "${UNINSTALL_CLAUDE}" = "true" ]; then
  97. if [ -L "${PATINA_DIR}" ]; then
  98. rm -f "${PATINA_DIR}"
  99. success "Claude Code: removed symlink ${PATINA_DIR}"
  100. REMOVED=1
  101. elif [ -d "${PATINA_DIR}/.git" ]; then
  102. rm -rf "${PATINA_DIR}"
  103. success "Claude Code: removed ${PATINA_DIR}"
  104. REMOVED=1
  105. elif [ -d "${PATINA_DIR}" ]; then
  106. error "${PATINA_DIR} exists but is not a patina git clone. Remove it manually if you are sure."
  107. fi
  108. fi
  109. printf "\n"
  110. if [ "${REMOVED}" = "1" ]; then
  111. success "✓ patina uninstalled."
  112. else
  113. warn "Nothing to remove. patina was not found in the standard install locations."
  114. info "If you installed via the Claude Code plugin marketplace, run: /plugin uninstall patina@patina"
  115. fi
  116. printf "\n"
  117. info "Environment variables to control uninstallation:"
  118. printf " UNINSTALL_CLAUDE=true|false (default: true)\n"
  119. printf " UNINSTALL_CODEX=true|false (default: true)\n"
  120. printf " UNINSTALL_CURSOR=true|false (default: true)\n"
  121. printf " UNINSTALL_OPCODE=true|false (default: true)\n"

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.