QuickForm Interactive Teaching Tool Creation Skill
Overview
This skill helps teachers quickly create professional interactive HTML teaching tools, automatically integrates with the QuickForm data collection platform, and ultimately generates a data analysis visualization dashboard. The entire process is completed in 8 steps.
Step 1: Confirm QuickForm Version & Account
Ask the user which version they are using
Ask the user:
"Which version of QuickForm would you like to use?
- A. Official Website Version (https://quickform.cn)
- B. Local Version (LAN-deployed version)"
Official Website Version Handling
- Check if the credentials cache file
~/.claude/quickform_credentials.jsonexists:cat ~/.claude/quickform_credentials.json 2>/dev/null - If the file exists and contains
official.usernameandofficial.password, read and use them directly. Do not ask again. Inform the user: "Using the previously saved account: xxx" - If it does not exist, ask the user for their official website account and password. After obtaining them, save to the cache file:
Write using bash:{ "official": { "username": "user-provided-account", "password": "user-provided-password" } }echo '{"official":{"username":"xxx","password":"xxx"}}' > ~/.claude/quickform_credentials.json
Local Version Handling
-
Default credentials: username
wst, passwordquickform(factory defaults for local deployment, keep unchanged) -
Automatically obtain the local address (try in the following priority order):
Step One: Check if an address is already saved
cat ~/.claude/quickform_credentials.json 2>/dev/nullIf the JSON already contains a
local.base_urlfield, use it directly and inform the user: "Using the previously saved local address: xxx". Skip subsequent detection.Step Two: Automatically detect local IP + port 5001 If no address is saved, first get the local LAN IP using Python:
import socket s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) s.connect(("8.8.8.8", 80)) local_ip = s.getsockname()[0] s.close() print(local_ip)Concatenate to
http://<local_ip>:5001, then verify if it is reachable:curl -s -o /dev/null -w "%{http_code}" http://<local_ip>:5001/- If it returns 200 or 302: Inform the user "Automatically detected local address: http://<local_ip>:5001, using it" and save it to the credentials file
- If the connection fails: Proceed to Step Three
Step Three: Auto-detection failed, ask the user to input manually
Auto-detection of address http://<local_ip>:5001 failed. Please manually enter the local QuickForm access address (e.g., http://192.168.1.100:5001):After obtaining the user's input, verify again. Save it upon successful verification.
Save the address to the credentials file:
python3 -c " import json, os path = os.path.expanduser('~/.claude/quickform_credentials.json') try: d = json.load(open(path)) except: d = {} d.setdefault('local', {})['base_url'] = 'http://finally-confirmed-address' json.dump(d, open(path, 'w'), ensure_ascii=False) print('Address saved') " -
Ask the user: "Is the local QuickForm service started? If not, please start the service first."
All local addresses in subsequent steps will use the variable LOCAL_BASE_URL (obtained from the above process). Do not hardcode the IP.
Step 2: Understand the Teaching Tool Design Style
Ask the user (provide options for guidance, allow free description):
"Please select the design style for the teaching tool (multiple choices or self-describe):
- 🎨 Clean Modern Style — Card layout, fresh colors, suitable for most scenarios
- 🌈 Gradient Colorful Style — Vivid gradients, dynamic effects, suitable for lively classrooms
- 🌙 Dark Mode — Dark background, neon colors, suitable for tech-focused courses
- 🎠 Child-Friendly Style — Rounded cute shapes, bright cartoons, suitable for lower primary grades
- 📊 Academic Formal Style — Professional tidy, data-oriented, suitable for high school or university
- 🖌️ Custom — Please describe the style you want"
Also ask:
- Target age/grade (e.g., 3rd grade primary, 2nd year middle school, high school students, university students)
- Subject (e.g., Language Arts, Math, English, Science, Information Technology, History, etc.)
Step 3: Gather Specific Requirements for the Teaching Tool
This step requires collecting sufficiently detailed information before starting development. The following three dimensions must be covered:
3.1 Interaction Method Requirements
Must be clear:
- What is the core function of the teaching tool (voting/survey/quiz/experiment log/work upload/discussion/gamified exercise, etc.)
- How students interact with the tool (clicking options/filling text/dragging/drawing/timed answering, etc.)
- Whether instant feedback is needed (show correct/wrong or explanation immediately after answering)
If the user's description is vague, proactively ask:
"What operation do you want students to perform on this page? What will they see after completing it?"
3.2 Data Submission Fields
Must clarify each field to be collected:
- Field name (English key, for API)
- Field meaning (Chinese explanation)
- Field type (text/number/option/time, etc.)
If the user hasn't mentioned fields, guide them to think:
"What information do you wish to collect from students? For example: student name, class, answer options, score, time spent, etc. Please list them one by one."
Example field format (for reference, actual needs depend on the user):
student_name: Student Name (text)
class: Class (text)
answer: Answer Options (A/B/C/D)
score: Score (number)
duration: Duration in seconds (number)
3.3 Data Analysis / Visualization Dashboard Requirements
Must be clear:
- What charts are desired (bar chart/pie chart/line chart/word cloud/leaderboard, etc.)
- Data statistics dimensions (compare by class/answer distribution/correct rate/average score/time trends, etc.)
- Dashboard overall style (consistent with the teaching tool/independent style/projection display style)
- Whether real-time refresh is needed
If information is insufficient, ask:
"What data do you want to show to the entire class during the lesson? How do you want students to see their own position in the class?"
Information Confirmation
After collecting the above three dimensions, organize a requirements summary and show it to the user for confirmation, in the following format:
📋 Requirements Confirmation Summary
[Basic Information]
- QuickForm Version: Official/Local
- Design Style: xxx
- Target Grade: xxx Subject: xxx
[Teaching Tool Interaction]
- Function Type: xxx
- Interaction Method: xxx
- Instant Feedback: Yes/No
[Data Collection Fields]
- field1: Meaning (Type)
- field2: Meaning (Type)
...
[Visualization Dashboard Requirements]
- Chart Types: xxx
- Statistics Dimensions: xxx
- Real-time Refresh: Yes/No
Wait for user confirmation before proceeding to Step 4.
Step 4: Create a Task in QuickForm
Based on the version selected in Step 1, create the corresponding QuickForm task.
Task Naming Rule: Name it after the teaching tool theme, concise and clear (e.g., "3rd Grade Math Addition & Subtraction Practice", "High School Chemistry Periodic Table Quiz")
Official Website Version Creation
curl -s -X POST https://quickform.cn/cli/add \
-H "Content-Type: application/json" \
-d '{"username":"<account>","password":"<password>","task_name":"<task name>","description":"<tool summary>"}'
Successful response example: {"success":true,"apiid":"k5egb0lbzi"}
- Data Submission URL:
https://quickform.cn/api/<apiid> - Data Fetch URL:
https://quickform.cn/api/<apiid>/all
Local Version Creation
The local version does not have a /cli/add endpoint. Use a Python session approach to log in and create the task, then parse the real API ID from the task page:
⚠️ Important: The local version's API endpoint address is not a numeric task ID (like
/api/10), but a random string ID generated by the system for each task (like/api/C9VaWGMQEZY). You must log in and parse it from the task detail page's HTML to obtain it. You cannot use the numeric ID to submit data.
import urllib.request, urllib.parse, http.cookiejar, re
cj = http.cookiejar.CookieJar()
opener = urllib.request.build_opener(urllib.request.HTTPCookieProcessor(cj))
# 1. Login
login_data = urllib.parse.urlencode({'username': 'wst', 'password': 'quickform'}).encode()
req = urllib.request.Request('<LOCAL_BASE_URL>/login', data=login_data)
req.add_header('Content-Type', 'application/x-www-form-urlencoded')
opener.open(req)
# 2. Create Task
task_data = urllib.parse.urlencode({'title': '<task name>', 'description': '<tool summary>'}).encode()
req2 = urllib.request.Request('<LOCAL_BASE_URL>/create_task', data=task_data)
req2.add_header('Content-Type', 'application/x-www-form-urlencoded')
resp = opener.open(req2)
final_url = resp.geturl() # Redirects to /task/<numeric_id>
numeric_id = re.search(r'/task/(\d+)', final_url).group(1)
# 3. Parse the real API ID from the task detail page (random string, not numeric ID)
req3 = urllib.request.Request(f'<LOCAL_BASE_URL>/task/{numeric_id}')
resp3 = opener.open(req3)
html = resp3.read().decode('utf-8')
api_links = re.findall(r'/api/([a-zA-Z0-9\-_]+)', html)
real_api_id = list(set(api_links))[0] # Real API ID
print(f"Numeric Task ID: {numeric_id}")
print(f"Real API ID: {real_api_id}")
- Data Submission URL:
<LOCAL_BASE_URL>/api/<real_api_id> - Data Fetch URL:
<LOCAL_BASE_URL>/api/<real_api_id>/all
The local version's data interface returns the
datafield as a Python dict string format (single quotes). When parsing it in the HTML dashboard, it needs to be converted to JSON (replace single quotes with double quotes).
Record Interface Information
Record the following information for use in subsequent steps:
SUBMIT_URL: Data submission URLFETCH_URL: Data fetch URLTASK_NAME: Task name
Step 5: Develop the Interactive HTML Teaching Tool Page
Based on all collected requirements, generate a complete single-file HTML teaching tool.
Technical Specifications
Must-follow principles:
- Single HTML file, all CSS and JS inline
- Use CDNs that are reliably accessible from mainland China (see list below)
- Data submission URL uses
SUBMIT_URL - Provide clear feedback to the student upon successful submission (success message/score/explanation)
- The page must display properly on both mobile and desktop (responsive)
Recommended CDNs (accessible from mainland China):
<!-- Tailwind CSS -->
<script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>
<!-- ECharts Charts (for visualization pages) -->
<script src="https://cdn.jsdelivr.net/npm/echarts@5/dist/echarts.min.js"></script>
<!-- Font Awesome Icons -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6/css/all.min.css">
<!-- Alpine.js Lightweight Interactions -->
<script defer src="https://cdn.jsdelivr.net/npm/alpinejs@3/dist/cdn.min.js"></script>
Data Submission Code Template:
async function submitData(formData) {
try {
const response = await fetch('SUBMIT_URL', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(formData)
});
const result = await response.json();
return result;
} catch (error) {
console.error('Submission failed:', error);
return null;
}
}
Teaching Tool Quality Requirements
- The page theme is prominent and matches the selected design style
- Font sizes are appropriate for the target age group (larger fonts for children)
- Interactive elements have clear visual feedback (hover effects, click animations)
- Submit button is prominent, submission process is simple (few steps)
- Includes a teaching tool title and brief usage instructions
- All form fields correspond exactly to the fields defined in Step 3.2
File Saving
Save the generated HTML to the current working directory, naming rule:
<task_name_teaching_tool>.html (Chinese can use pinyin abbreviations, spaces with underscores)
Step 6: Automatically Submit 3 Test Data Records
Based on the teaching tool's field structure, generate 3 realistic-looking test data records and submit them.
Test Data Principles:
- Data must have variability (not all three identical)
- Data must match the real scenario (realistic student names, reasonable score distribution)
- Cover different situations (e.g., correct answers, wrong answers, different classes)
Submission Method: Use curl to submit one by one
curl -s -X POST "SUBMIT_URL" \
-H "Content-Type: application/json" \
-d '{"field1":"value1","field2":"value2",...}'
After submission, inform the user: "✅ Successfully submitted 3 test data records"
Step 7: Develop the Data Analysis Visualization Dashboard
7.1 Obtain Test Data Structure
curl -s "FETCH_URL"
Read the returned complete JSON data to understand the data structure (field names, data types, nesting relationships).
Record the complete data structure as a reference for development.
7.2 Develop the Visualization Dashboard HTML
Develop based on the following comprehensive information:
- The real data structure and fields obtained in Step 7.1
- The visualization requirements proposed by the user in Step 3.3
- The theme and style of the teaching tool page (maintain consistency)
Technical Specifications:
- Single HTML file, all code inline
- Use ECharts (from
cdn.jsdelivr.net) to render charts - The page automatically fetches data from
FETCH_URLand renders on load - For real-time refresh, use
setIntervalto refresh every 10-15 seconds - Dashboard layout suitable for projection display (16:9 ratio friendly, larger fonts)
The dashboard must include:
- Page top: Tool title + current data statistics overview (participation count, average score, etc., core metrics)
- Main area: User-requested charts (using ECharts)
- Data source interface address (small text in footer)
Data Fetch Code Template:
async function fetchData() {
const response = await fetch('FETCH_URL');
const data = await response.json();
// data structure to be processed based on the actual data obtained in Step 7.1
return data;
}
File Saving
Naming rule: <task_name_data_dashboard>.html
Step 8: Completion Report
After development is complete, output a brief report to the user:
🎉 QuickForm Teaching Tool Development Complete!
📁 Generated Files
- Teaching Tool Page: <filename>.html
- Data Analysis Dashboard: <filename>.html
🔗 Interface Information
- Data Submission: SUBMIT_URL
- Data Fetch: FETCH_URL
📊 Test Data
- 3 test data records submitted. View their effect on the dashboard page.
💡 Usage Tips
1. Share the teaching tool page with students (via LAN or public URL)
2. After students fill it out and submit, open the data dashboard to view results in real-time
3. To modify styles or fields, edit the HTML files directly
References
- QuickForm API Documentation: See
references/quickform-api.md - Visualization Chart Examples: See
references/echarts-examples.md - China-accessible CDN List: See
references/china-cdn.md