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

poly-context

Skill by JetBrains

Implements PolyContext, an IntelliJ Platform mechanism that detects the active coding environment for a location, such as the web framework in use. It is for plugin developers who need feature gating or environment detection.

  • Score 78
  • 21k stars
  • NOASSERTION
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install poly-context

Built from the published package, never by AI.

git clone --depth 1 https://github.com/JetBrains/intellij-community /tmp/intellij-community && mkdir -p ~/.claude/skills && cp -r /tmp/intellij-community/.agents/skills/poly-context ~/.claude/skills/poly-context

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

Step-by-step: install poly-context in Claude Code

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

About

PolyContext answers which coding environment applies at a given location. For a context kind such as "framework", it returns at most one active name, or null if none applies. Plugins can add detection through direct PolyContextProvider implementations, declarative Web Types context rules, or code-based rules.

The mechanism is designed to be cheap and cached, so it can serve any feature relevance check, not only JavaScript framework detection. A VirtualFile overload works before a PSI tree exists, which lets language substitution choose a dialect. Users can force context values with a .ws-context file. Poly Symbols is its biggest consumer, but PolyContext does not depend on it.

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

What it can do

  • PolyContext.getReturns the active name for a context kind at a PsiElement or VirtualFile location.
  • PolyContextProviderAdds direct or dynamic detection by implementing isEnabled() or isForbidden().
  • Context rules in Web TypesDeclares enable-when and disable-when rules under contexts-config in Web Types JSON files.
  • PolyContextRulesProviderDefines context rules in code for cases that static file data cannot express.
  • .ws-context overridesLets users force context values per file path using a JSON file with glob patterns.
  • PolyContextSourceProximityProviderComputes proximity for new package managers or languages with a global-library concept.

Try asking

  • Explain how to detect the active framework for a file with PolyContext.
  • Show how to write a PolyContextProvider that caches its detection result.
  • Add a Web Types contexts-config rule that enables a context for a file extension.

Good to know

  • Rule output must stay stable, since a change triggers project rescanning and cache invalidation.
  • The disable-when rule supports only file-extensions and file-name-patterns.
  • The Node Package Manager Web Types context rule requires the JavaScript plugin.
  • The pre-2024.2 Web Types layout is deprecated and should not be used for new files.

Security check

A

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

Checked automatically: .agents/skills/poly-context/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Alternatives to poly-context

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

poly-context: common questions

What does PolyContext return?

It returns the single active name for a given context kind at a location, or null if no name applies. The source gives "framework" with values such as "vue", "angular" or "astro" as an example.

Can PolyContext be used during language substitution?

Yes. The VirtualFile and Project overload works before any PSI exists for the file, so the platform can use it while deciding which Language to parse the file as.

Can users override detected contexts?

Since 2024.1.2, users can force context values with a .ws-context JSON file that maps context kinds or glob paths to values.

How do I install poly-context?

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

Is poly-context free?

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

Is poly-context safe to use?

It scores 78 of 100. Grades: maintenance A, licence F, 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 poly-context?

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

poly-context Install

Add to stack

Loading.