Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

compromise-nlp

Skill by spencermountain

Guides AI assistants in writing correct code with the compromise JavaScript NLP library. It covers match syntax, valid tags, transforms and common text tasks for developers using the npm package.

  • Score 89
  • 12k stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install compromise-nlp

Built from the published package, never by AI.

git clone --depth 1 https://github.com/spencermountain/compromise /tmp/compromise && mkdir -p ~/.claude/skills && cp -r /tmp/compromise/docs ~/.claude/skills/compromise-nlp

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install compromise-nlp in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

This skill is a guide for writing code with compromise, a rule-based English NLP library for JavaScript that needs no network, model or dependencies. It explains how to turn text into a document, tag parts of speech, and find and transform parts of it with a chained, jQuery-like API. It covers the match syntax, the valid tagset and common tasks such as extracting people, numbers and dates, changing verb tense, pluralizing and redacting text.

The skill lists five rules that prevent common mistakes. Transforms change the document in place, so the caller must read results from the original variable or clone first. Invalid tags match nothing without an error, match operators work on whole terms rather than characters, and matches stop at sentence boundaries. It notes quirks such as redact skipping organizations, and gives debugging tools like debug() and json(). It is aimed at developers and AI assistants writing JavaScript or TypeScript that uses compromise.

Written from the project's SKILL.md and checked against it.

What it can do

  • Match syntax guidanceExplains .match() operators such as tags, optional terms, capture groups and regex tokens.
  • Tagset referenceLists valid part-of-speech tags and their hierarchy, with a pointer to the installed docs.
  • Entity extractionExtracts people, topics and numbers with methods like .people() and .numbers().
  • Verb and noun transformsChanges verb tense and pluralizes nouns with .toPastTense() and .toPlural().
  • Text redactionRedacts people, places, emails and phone numbers with .redact().
  • Non-destructive copiesShows how to call clone() before transforming so the original document is kept.
  • DebuggingShows how to inspect tagging with .debug(), .json() and nlp.verbose().
  • Custom lexiconShows how to teach words per call or globally with nlp.addWords().

What you need

  • npm package compromise
  • JavaScript or TypeScript project

Try asking

  • Write a function that extracts all people's names from a paragraph using compromise.
  • Change the verbs in this text to past tense with compromise and keep the original.
  • Redact people, places and emails from this text using compromise in JavaScript.

Good to know

  • Matches do not cross sentence boundaries; multi-sentence matching needs the compromise-paragraphs plugin.
  • redact() does not remove organizations, despite some older docs.
  • Some older documented methods do not exist and will throw.
  • Transform methods change the document in place.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: docs/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • CLI.md6 KB
  • SKILL.md7 KB
  • api.md23 KB
  • concepts.md5 KB
  • contractions.md23 KB
Show all 12 files
  • dates-plugin.md60 KB
  • development.md2 KB
  • match-syntax.md9 KB
  • recipes.md6 KB
  • spec-format.md15 KB
  • tag-definitions.md22 KB
  • tagging-differences.md7 KB

Alternatives to compromise-nlp

All alternatives →
openclaw-github-repo-commandersickn33
94

Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.

AAA Skill 50k
gradiogradio-app
94

Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.

AAA Skill 44k
hig-components-menussickn33
94

Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.

AAA Skill 50k
fastapi-templateswshobson
94

Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.

AAA Skill 43k
appfunctionsandroid
94

Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.

AAA Skill 11k
agent-qa-authoringsickn33
94

Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.

AAA Skill 50k

Compare with openclaw-github-repo-commander, gradio or hig-components-menus

compromise-nlp: common questions

Does compromise need a network or a machine learning model?

No. The source says compromise is rule-based, with no network, no model and no dependencies.

Why does my compromise match return nothing?

Usually the tag is not a real tag, which matches nothing without an error, or the match crosses a sentence boundary. Use doc.debug() to see how words were tagged.

Why does .text() return only part of my sentence after a transform?

Transform methods return the selection they acted on. Read the result from the original document variable, or call clone() first to keep the original.

How do I install compromise-nlp?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is compromise-nlp free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is compromise-nlp safe to use?

It scores 89 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to compromise-nlp?

Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.

compromise-nlp Install

Add to stack

Loading.