Extending Our CoWork Agent with a Cortex Agent Skill
Introduction
In the rapidly evolving world of AI, enhancing capabilities through modular extensions significantly impacts the efficiency and accuracy of operations. Krishnan Srinivasan, in his article originally published on Towards AI, delves into the integration of a Cortex agent skill with the existing CoWork Fraud Operations Agent in Snowflake. The aim is to enable consistent and verifiable domain reasoning, enhancing the decision-making process during fraud escalations.
Expanding Capabilities with Cortex Skills
The initial setup involved creating a Fraud Operations Agent using Snowflake CoWork. This involved using a semantic view for structured queries, a stored procedure for writing escalations, and a Cortex Analyst tool. The agent was capable of answering questions and taking actions based on the responses. However, the introduction of a Cortex agent skill takes this a step further.
The Cortex skill is not a traditional procedural SQL code but a set of packaged, reusable instructions that empower the agent to autonomously analyze and decide on escalation actions. This ensures a consistent framework is applied every time, enhancing reliability regardless of how questions are phrased.
Understanding Agent Cortex Skills
A Cortex skill is a modular set of instructions stored in a file named SKILL.md within a Snowflake step. This file includes a name, description, and detailed instructions that guide the agent’s decision-making process. The discovery mechanism is pivotal; upon receiving a request, the agent evaluates the skill’s relevance based on its description and follows the instructions if deemed pertinent. This dynamic setup allows instant updates to the agent’s behavior by simply updating the SKILL.md file.
The Structure of SKILL.md
The SKILL.md file consists of three parts: a name (e.g., Fraud Escalation Guidance), a description that acts as a trigger, and a set of instructions for reasoning and reaction. For fraud operations, this includes prioritizing signals, setting chargeback rate thresholds, identifying high-risk merchant categories, and structuring the reporting reason. This structured approach mimics a standard operating procedure, ensuring consistency.
Creating the Scene and Uploading the Skill
To start, save the SKILL.md file locally. Within the Snowsight SQL spreadsheet, run commands against the previously created fraud operations database, then access the scene:
Catalog -> Database Explorer -> FRAUD_OPS_DB->CORE->Steps-> SKILLS_STAGE
Upload the SKILL.md file into a new folder named fraud_escalation within the scene. Verify the file’s presence to ensure successful upload.
Integrating the Skill into the Agent
Next, attach the skill to the Fraud Ops agent. In Snowsight, navigate to AI and ML > Agents and access the FRAUDOPS agent. Under Configuration, select the SKILLS tab, and add the skill by specifying the stage and folder path:
- Select Add Skill -> Add from Step
- Choose stage: FRAUD_OPS_DB.CORE.SKILLS_STAGE
- Select skills folder path: “fraud_escalation”
- Enter the skill name as “SKILL.md”
- Click Add and then Save
Transformations within CoWork
Activating the skill changes how the agent evaluates transactions for escalation. Without it, responses are generic. With the skill, the agent follows a structured, priority-based approach, evaluating customer risk levels, merchant chargeback rates, and country mismatches. This structured reasoning is visible within CoWork’s Thinking Steps panel.
For example, when asked to review a significant transaction from a cryptocurrency exchange, the agent identifies the transaction, assesses risks, and provides a reasoned recommendation for escalation.
Conclusion: The Value of Skills Over Instructions
The Cortex skill offers two main advantages: encoding domain knowledge in a versioned, auditable format and ensuring reproducible reasoning. This approach maintains a clean agent configuration and allows detailed domain logic to evolve independently.
For more insights, practical implementations of AI, and detailed walkthroughs, follow Krishnan Srinivasan on LinkedIn and Medium. You can access the full code and SKILL.md file for this walkthrough Here.
Published via Toward AI
“`

