agentleFS
apereoapereo/cas/.claude/skills/cas-groovy-scripting/SKILL.md

cas-groovy-scripting

Skill11k starsChanged yesterdayApache-2.0View on GitHub

Review and change Groovy scripting support (core/cas-server-core-scripting): ScriptResourceCacheManager, CompiledGroovyScript, inline vs external scripts, compiling off the request path, script security. Use when touching Groovy scripts or any module that runs them.

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Start at core/cas-server-core-scripting.

    line 10
  2. Very specific:

    Do not compile scripts on a request path (fromScript/fromResource per call).

    line 20
  3. Very specific:

    Treat compiling a Groovy script as running it: AST transformations execute inside the compiler.

    line 30

≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Groovy and scripting

Groovy and scripting

  • Start at core/cas-server-core-scripting; roughly fifty modules delegate to the same five classes, so changes there are changes to authentication, attribute release, MFA, AUP, OIDC, SAML and themes at once.
  • ScriptResourceCacheManager is a singleton whose close() clears the entire cache — it must never be used in a try-with-resources block.
  • CompiledGroovyScript.of decides how a script runs: a stateless script (only final fields holding immutable values) gets a fresh instance per call and runs in parallel; a stateful one keeps a shared instance serialized on a blocking lock, on purpose, so its fields stay consistent. Do not report that lock as a bottleneck. Review every script-backed decision for what a null result means and prefer fail-closed defaults at security boundaries — MFA triggers and AUP read null as "skip". Never guard script execution with a timed tryLock; a timeout that returns null is indistinguishable from a script that declined.
  • Do not compile scripts on a request path (fromScript/fromResource per call). Go through resolveScriptableResource, or hold the compiled script in a transient field, and remember fromResource also starts a file-watcher thread that nothing closes. The cache manager comes from ApplicationContextProvider and is absent outside Spring, so always fall back to the factory instead of throwing, or you will break components and tests that are constructed directly.
  • Inline (groovy { ... }) and external (file:/classpath:) scripts behave differently: only external scripts honour failOnError and support reload, and only inline scripts support bindings (the setBinding interface default is a no-op). Inline scripts swallow GroovyRuntimeException. Test both forms, and cover bindings with concurrent and pooled-thread tests — GroovyShellScriptTests.BindingTests is the pattern.
  • Treat compiling a Groovy script as running it: AST transformations execute inside the compiler. Script text that comes from anywhere other than deployment configuration must be parsed (ScriptingUtils.validateGroovyScript), never compiled.
  • Puppeteer coverage lives in the 18 ci/tests/puppeteer/scenarios/*groovy* scenarios (service-access-strategy-groovy, surrogate-login-groovy, mfa-provider-selection-trigger-groovy, interrupt-afterauthn-groovy, webflow-groovy-action, …). None of them exercise concurrency, script errors, or cache expiry, so a change in this area needs new coverage rather than a rerun.

Download now (ZIP)

Trending

Quiet since August.about the whole repository

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 0 mentionsApr 2026: 0 mentionsMay 2026: 0 mentionsJun 2026: 0 mentionsJul 2026: 1 mentionAug 2026: 1 mentionSep 2026: 0 mentionsOct 2026: 0 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the apereo/cas repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about apereo/cas

The biggest 5 of 27 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 27

Talked about on Stack Overflow, GitHub, Hacker News and the web (27 times).

On Stack Overflow · 14

9 more on Stack Overflow

On GitHub · 9

4 more on GitHub

On Hacker News · 3

On the web · 1

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.