Learning Commands · Assessment

/code command

Generate an interactive coding problem with real code execution

1 min read

Generate an interactive coding problem with real code execution

At a glance

Field Value
Command /code
Usage `/code [--lang=python
Category assessment
Execution server
Context pok
Response type mini-canvas
Active PoK required yes

Examples

/code
/code --lang=python --difficulty=medium
/code --scope=unit --lang=javascript
/code --difficulty=hard --hint=no
/code --lang=python --request=binary search
/code --scope=free --lang=python --request=two sum

How it works

The code command generates an interactive coding problem (like LeetCode) based on your learning material.

How it works:

  1. AI generates a coding problem from your current learning content
  2. A code editor opens with the problem description and starter code
  3. Write your solution, run against test cases, and submit for full evaluation
  4. Get hints over time and view the model solution after solving

Options:

  • --lang: Programming language — python, javascript, typescript, java, cpp, etc.
  • --difficulty: easy, medium, hard, or very-hard
  • --scope: Content scope — free (any topic), pok (current topic), unit (full unit), all (entire session)
  • --hint: Number of progressive hints (1-3) or no to disable
  • --request: Specific algorithm or topic to focus on

Features:

  • Real code execution with Judge0
  • 10 test cases (3 visible, 7 hidden)
  • Progressive hints with timed unlock
  • Model solution with explanation and takeaways
  • Supports 20+ programming languages

Tips:

  • Use --lang=python for algorithmic problems
  • Use --difficulty=easy for warmup problems
  • Combine: /code --lang=javascript --difficulty=hard --scope=unit

Was this article helpful?