Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
git clone --depth 1 https://github.com/lsampaioweb/ai-instructionsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/rules/lsampaioweb/ai-instructions/spring-boot-http-client)<a href="https://agentmods.dev/rules/lsampaioweb/ai-instructions/spring-boot-http-client"><img src="https://agentmods.dev/badge/rules/lsampaioweb/ai-instructions/spring-boot-http-client/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/rules/lsampaioweb/ai-instructions/spring-boot-http-client"><img src="https://agentmods.dev/badge/rules/lsampaioweb/ai-instructions/spring-boot-http-client.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.00418 |
| Opus 5.5 | $0.00000 | $0.00167 |
| Sonnet 5.5 | $0.00000 | $0.00084 |
| Haiku 4.5 | $0.00000 | $0.00042 |
Grade A, and why
spring-boot-http-client scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 13d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
What it actually says
Spring Boot HTTP Client Contract
These rules apply when the application calls an external HTTP API. They do not apply to inbound REST controllers or to JDBC/Redis access.
Architecture, exception handling, and configuration secrets stay in their own instruction files. Do not restate those contracts here.
Client choice
- Use Spring
RestClientfor blocking outbound HTTP. - Do not use
RestTemplate. - Do not use
WebClientunless the application is already reactive.
Configuration
- Create one named
RestClientbean per remote system. - Load base URL, connect timeout, and read timeout from
@ConfigurationProperties. Never hardcode the remote URL. - Set connect and read timeouts on the request factory.
- Set a default
Accept: application/jsonheader when the remote API is JSON. - Build the client in a
@Configuration@Beanmethod and inject the builtRestClient. Do not keep aRestClient.Builderfield and build it in@PostConstruct.
Where calls live
- Keep
RestClientusage inside a repository implementation (architecture contract). Do not inject or expose it on controllers or services.
Failures
- When the remote failure must be returned from this application's HTTP API,
map 4xx/5xx into
AppException(exception contract). Do not leak client exceptions to API callers.
Forbidden
- Never use
RestTemplate. - Never use
WebClientin a servlet/MVC application. - Never hardcode remote base URLs.
- Never omit connect and read timeouts.
- Never build the client in
@PostConstruct. - Never call
RestClientfrom a controller (architecture contract).
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 13d ago Changed · +14 lines fbd833ea2459
- 1mo ago First seen · 37 lines · 0 tokens per session scan A 7ef23d70aef4
spring-boot-http-client is a cursor rule published in the GitHub repository lsampaioweb/ai-instructions (1 stars, last pushed 14d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 418 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other cursor rules, from other repositories
springboot-jpa-best-practices
A set of Chinese-language rules for structuring Java Spring Boot applications that use JPA, a library for database access.
graftcode-java
Mandatory Graftcode architecture rules for building Java backend services (plain Maven/Gradle modules exposed via Graftcode Gateway, not REST).
spring-retry-conventions
Spring Boot database retry conventions using AbstractDatabaseService and RetryTemplate.
java-springboot-standards
Java Spring Boot coding standards and patterns for your monorepo services.
spring-boot
Spring Boot: annotations, dependency injection, JPA patterns.
http-clients
RestClient and declarative HTTP interfaces for calling backend APIs - Spring Boot 4+.