- Home
- Skills
- APIs & Backend
- Apex RestAPI Skill Pack
More screenshots
Works with the AI Agents you already use
Apex RestAPI Skill Pack
Scaffold and audit hardened Salesforce Apex REST API frameworks and feature endpoints with built-in security linting.
$18
Apex RestAPI Skill Pack
Example session with this skill installed
Install the v2 Apex REST framework in my project with the namespace 'integrations/v1' and include the health check.
- Read your context and instructions
- Compiled the apex restapi
I have inspected the project and prepared the Apex REST base framework installation. Since this is a new setup, I will scaffold the full v2 common layer under the integrations/v1 namespace.
Framework Installation Plan
The following components have been generated and added to the project manifest:
| File | Status | Description |
|---|---|---|
C_Common_Constant.cls | Created | Centralized return codes (100-500) and content types. |
A_Common_Response.cls | Created | Fluent builder for JSON, Text, and Blob responses. |
A_Common_Request.cls | Created | Hardened wrapper for path, query, and body access. |
A_Common_BaseRestApiController.cls | Created | Base entry point for @RestResource classes. |
A_Common_RestApiImplement.cls | Created | The contract for feature endpoints with auto-envelope. |
A_Common_TestUtil.cls | Created | Mocking utility for RestRequest/RestResponse. |
A_Ping.cls | Created | Health check at /services/apexrest/integrations/v1/ping. |
package.xml | Updated | Added 8 new Apex classes and metadata. |
Verification
The files were generated using the v2 hardened templates. No Salesforce ORG was connected, so the classes have not been compiled. All generated classes include -meta.xml files targeting API version 60.0 as found in your sfdx-project.json.
Next steps
- Deploy these classes to your scratch org or sandbox using
sf project deploy start. - Run
A_Common_FrameworkTestto verify the installation. - Use the
apex-rest-featureskill to create your first functional endpoint.
Connects securely to your tools. The creator never sees your data.
About this skill
Standardizing Apex REST APIs in Salesforce often leads to fragmented error handling, leaky abstractions, and inconsistent response envelopes. This skill pack enforces a unified, hardened framework for building and auditing @RestResource endpoints.
What it does
- Framework scaffolding: Installs the
A_Commonbase layer including shared controllers, request/response builders, and health check endpoints. - Feature generation: Builds new REST endpoints extending the base framework with automated boilerplate for CRUD operations.
- Security enforcement: Implements static checks for SOQL injection, hardcoded secrets, and sharing settings.
- Bulk safety: Automatically generates test classes that assert governor limit constants for batch inputs.
- Audit & Upgrade: Detects legacy framework versions and manages refactoring to the v2 hardened contract while preserving project-specific customizations.
How it works
- Project Inspection: Run the inspection script to identify framework status (missing, legacy, or v2) and existing URL namespaces.
- Base Installation: Use the scaffolding script to deploy the common layer, including constants, test utilities, and the base API controller.
- Endpoint Creation: Define the API contract (verbs, paths, JSON schema) and generate the feature class and its companion test.
- Validation: Execute the static linter to catch loop-based SOQL/DML and missing input validation before deployment.
Frameworks & tools
Salesforce DX (SFDX) projects, Apex, Python 3 (for local scripting), and the Salesforce CLI for optional deployment and test execution.
Why this beats prompting it yourself
Writing boilerplate for Salesforce REST APIs is error-prone regarding exception handling and response headers. This skill ensures every endpoint follows a strict contract, handles HTTP 500s gracefully, and includes high-coverage tests that actually validate governor limits.
Use cases
- Bootstrapping a new Salesforce project with a standardized REST API layer.
- Exposing Salesforce SObjects to external mobile or web applications via JSON.
- Hardening existing Apex REST classes to prevent stack trace leakage and injection.
- Migrating legacy @RestResource implementations to a modern, maintainable base class.
Known limitations
Requires a Salesforce DX project structure with an sfdx-project.json file. Static analysis is heuristic and does not replace the Apex compiler or server-side execution.
Requires SFDX project structure. Static analysis cannot replace the Apex compiler. All-or-nothing installation fails if target files exist without --force.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before any payment.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 13 days ago
Requires
Permissions
File Scopes
Shell, read and write: the bundled Python scripts (standard library only) inspect the Salesforce DX project, create new Apex classes and -meta.xml files in the project's classes folder, and add their names to manifest/package.xml. Existing files are never overwritten without explicit --force, and every write command supports --dry-run. Network: the scripts make no network calls. The only network use is the optional Salesforce CLI commands (sf project deploy, sf apex run test) to the buyer's own org, which the agent runs only after asking. No telemetry, no external URLs. File scopes assume the default package directory force-app; the skills follow packageDirectories in sfdx-project.json if the project uses another folder.