mouadja02/skills/smolagents-code-agents

Claude Code and agent skill by mouadja02/skills

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Use when building Hugging Face smolagents, code-executing agents, Python-action agents, Hub-shared tools, or lightweight agent prototypes that need sandboxing and provider flexibility.

Install

npx vskill@latest install mouadja02/skills/smolagents-code-agents

SKILL.md

The same SKILL.md was published earlier as mouadja02/skills/smolagents-code-agents.

Smolagents Code Agents

Use code actions when an agent benefits from loops, variables, data transforms, and multi-call tool composition. Treat generated code as untrusted unless it runs in a real sandbox.

Use When

  • The user wants a lightweight agent prototype in Python.
  • Tool calls need loops, branching, or batching.
  • The agent should use Hugging Face Inference Providers, LiteLLM, OpenAI-compatible servers, local transformers, or Ollama.
  • The agent needs MCP tools, Hub tools, or a shared Space.
  • You must decide between CodeAgent and ToolCallingAgent.

Build Pattern

  1. Choose CodeAgent when actions need Python control flow; choose ToolCallingAgent for simple structured tool calls.
  2. Keep tools small, typed, and side-effect explicit.
  3. Configure the model through environment variables or a provider object, never hard-code secrets.
  4. Run code execution in Docker, E2B, Modal, Blaxel, or another isolation boundary.
  5. Allow imports by explicit whitelist only.
  6. Stream logs and capture intermediate observations for debugging.
  7. Add a task-level timeout and max-step budget.

Safety Baseline

Never treat LocalPythonExecutor as a security boundary for untrusted code. Use it only for trusted local experiments.

Generate a starter safety scaffold:

bash
python scripts/smolagent_safety_scaffold.py --name research_agent

Review sandboxing-checklist.md before running any agent that executes model-written code.

Quick Selection

RequirementChoose
Agent writes Python actionsCodeAgent
Strict JSON-like tool callsToolCallingAgent
Untrusted tasks or web dataSandboxed executor
Local model experimentsTransformersModel or Ollama-compatible provider
Hosted provider flexibilityInferenceClientModel, LiteLLMModel, or OpenAI-compatible model

Common Mistakes

MistakeFix
Running untrusted code locallyUse Docker or managed sandbox
Exposing broad filesystem accessMount a temporary workspace only
Giving tools vague docstringsMake inputs, outputs, and side effects explicit
Letting agents import anythingWhitelist imports per task
Shipping without trace logsPersist steps, code snippets, tool outputs, and final answer

References

  • GitHub: huggingface/smolagents - https://github.com/huggingface/smolagents
  • Hugging Face docs: smolagents - https://huggingface.co/docs/smolagents/index
  • Hugging Face docs: CodeAgent - https://huggingface.co/docs/smolagents/reference/agents
  • Hugging Face docs: MCP tools - https://huggingface.co/docs/smolagents/tutorials/mcp

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
10
Repository forks
5
7-day trend score
17

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Grok Build (Cursor)
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/mouadja02/skills/smolagents-code-agents/badge)](https://verified-skill.com/skills/mouadja02/skills/smolagents-code-agents)

Something wrong with this skill or its page? Tell us.