Skip to content
Agentmart
Submit a tool

no-controller-direct-repository-access

Do not inject a *Repository or *Dao into a @Controller/@RestController.

Skill by StopThatSlop

IndexedMIT★ 4
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/stopthatslop-no-controller-direct-repository-access

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Do not inject a *Repository or *Dao into a @Controller/@RestController. Route through a service. Use only when editing Spring controllers. Do not use for @ControllerAdvice without a repository, or tests.

Use cases: writing

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/no-controller-direct-repository-access

What's inside

Skill name
no-controller-direct-repository-access
Description
Do not inject a *Repository or *Dao into a @Controller/@RestController. Route through a service. Use only when editing Spring controllers. Do not use for @ControllerAdvice without a repository, or tests.
License
MIT
Metadata
pack: stopthatslop-java-spring-v1 · globs: **/*Controller.java · engine_rule_id: java.architecture.no-controller-direct-repository-access
Instructions
32 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

# Controllers do not inject repositories

Controllers that call repositories skip the transaction and policy boundary.

## Do

```java
@RestController
class InvoiceController {
    private final InvoiceService invoices;
}
```

## Do not

```java
@RestController
class InvoiceController {
    private final InvoiceRepository invoices;
}
```

## Enforce

CI gates this rule (`enforcement: checker`):

```bash
python3 scripts/check.py --repo-root . --pack java --rule java.architecture.no-controller-direct-repository-access
```

From StopThatSlop/stopthatslop, MIT.

More from StopThatSlop/stopthatslop

Signals

Stars
4
Forks
0
Open issues
0
Last commit (this folder)
Sep 1, 2026 (1 month ago)
Last release
Sep 13, 2026 (1 month ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from StopThatSlop

Cite this page

no-controller-direct-repository-access skill. Agent Mart. https://agentmart.dev/skills/stopthatslop-no-controller-direct-repository-access (last updated 2026-10-24)