Skip to main content 首页 创作者 forceinjection domain-driven-design-skills implement-scm-features
implement-scm-features Build features in the SCM (School Coaching Manager) section. Use for creating pages, hooks, and visualizations for podsie tracking, roadmaps, velocity, and assessment data.
跳到安装 Skills Marketplace 发现并探索由社区构建的 Agent Skills
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/ForceInjection/domain-driven-design-skills --skill implement-scm-features命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
下载 Zip 下载中... Conduct deep academic research for philosophy, neuroscience, cognitive science, and theoretical computer science (computability, complexity, AI theory, logic). Use when user asks to: research academic topics, find scholarly papers, conduct literature reviews, analyze citations, synthesize research findings, explore philosophical arguments, investigate consciousness/cognition, study computability/decidability/Turing machines, or analyze academic debates. Triggers on: 'research papers', 'literature review', 'academic sources', 'scholarly articles', 'philosophy of mind', 'computability theory', 'neuroscience studies', 'find papers on', 'what does the research say'.
name Implement SCM Features description Build features in the SCM (School Coaching Manager) section. Use for creating pages, hooks, and visualizations for podsie tracking, roadmaps, velocity, and assessment data.
Implement SCM Features
Build features in the SCM (School Coaching Manager) section of the app. This includes pages under /src/app/scm/ for podsie tracking, roadmaps, velocity, and assessment data.
When to Use This Skill
Use when the user asks to:
Create new SCM pages or features
Add data fetching to SCM pages
Build visualizations for velocity, roadmaps, or assessments
Work with section/class data
Architecture
File Structure
src/app/scm/
├── podsie/ # Velocity tracking, progress, weekly reports
│ ├── velocity/ # Class velocity tracker
│ ├── progress/ # Student progress tracking
│ ├── weekly/ # Weekly summary reports
│ ├── pace/ # Pacing analysis
│ └── hooks/ # Shared podsie hooks
├── roadmaps/ # Skills mastery and curriculum
│ ├── history/ # Assessment history
│ ├── progress/ # Roadmap completions
│ ├── mastery-grid/ # Student mastery visualization
│ ├── skills/ # Skill browser
│ ├── units/ # Unit browser
│ └── hooks/ # Shared roadmaps hooks
└── ...
Centralized Hooks Location
All SCM React Query hooks are available at:
import { ... } from "@/hooks/scm" ;
Available Hooks
Section & Class Hooks
const { sectionOptions, sectionColors, loading } = useSectionOptions ();
{ sections, loading } = ();
{ daysOff, loading } = (schoolYear);
{ currentUnits, loading } = (schoolYear);
const
useSections
const
useDaysOff
const
useCurrentUnits
Velocity Hooks
const { velocityData, detailData, unitScheduleData, loadingSectionIds } =
useVelocityData (selectedSections, sectionOptions, schoolYear, includeNotTracked);
const { sectionData, loading, error } =
useWeeklyVelocity (sections, startDate, endDate);
Roadmap Hooks
const { units, loading, error } = useRoadmapUnits ();
const { roadmapData, loadingSectionIds } = useRoadmapData (selectedSections);
const { allSkills, loading } = useAllSkills ();
const { skills, loading, error } = useFilteredSkills (selectedGrade, selectedUnit);
Assessment Hooks
const { data, loading, error } = useAssessmentData ();
const { data, loading, error, refetch } = useZearnCompletions ();
const { data, loading, error } = usePodsieCompletions ();
const { studentsBySection, loading } = useStudentsBySection ();
Patterns
Creating a New SCM Page
Use existing hooks from @/hooks/scm or page-specific hooks
Use useMemo for derived/filtered data
Use useEffect only for side effects (e.g., clearing selection on filter change)
"use client" ;
import { useState, useMemo, useEffect } from "react" ;
import { useSectionOptions, useRoadmapUnits } from "@/hooks/scm" ;
export default function MyPage ( ) {
const [selectedGrade, setSelectedGrade] = useState ("" );
const { sectionOptions, loading } = useSectionOptions ();
const { units } = useRoadmapUnits ();
const filteredUnits = useMemo (() => {
if (!selectedGrade) return [];
return units.filter (u => u.grade === selectedGrade);
}, [selectedGrade, units]);
useEffect (() => {
}, [selectedGrade]);
}
Creating a New Hook Place hooks in the appropriate location:
Page-specific : src/app/scm/{area}/{page}/hooks/
Shared within area : src/app/scm/{area}/hooks/
Shared across SCM : Export from src/hooks/scm/index.ts
import { useQuery } from "@tanstack/react-query" ;
export const myDataKeys = {
all : ["my-data" ] as const ,
byId : (id : string ) => [...myDataKeys.all , id] as const ,
};
export function useMyData (id : string ) {
const { data, isLoading, error } = useQuery ({
queryKey : myDataKeys.byId (id),
queryFn : async () => {
const result = await fetchMyData (id);
if (!result.success ) {
throw new Error (result.error );
}
return result.data ;
},
staleTime : 60_000 ,
enabled : !!id,
});
return {
data : data || [],
loading : isLoading,
error : error?.message || null ,
};
}
Shared Layout Components Use existing layout components for consistent UI:
import {
SectionVisualizationLayout ,
SectionAccordion ,
type SectionOption ,
type AccordionItemConfig ,
} from "@/components/composed/section-visualization" ;
Server Actions Server actions for SCM data are located at:
src/app/actions/scm/ - Student, section, velocity, roadmap actions
src/app/actions/calendar/ - Calendar and scheduling actions
src/app/actions/scm/
├── students.ts # CRUD for students collection
├── student-data.ts # Student dashboard data aggregation
├── section-config.ts # Section configuration management
├── velocity/velocity.ts # Velocity calculations
├── podsie-sync/ # Podsie API integration
├── podsie-completion.ts # Podsie completion queries
├── roadmaps-units.ts # Roadmap units CRUD
├── roadmaps-skills.ts # Roadmap skills CRUD
├── roadmaps-lessons.ts # Scope and sequence lessons
├── scope-and-sequence.ts # Curriculum sequence data
├── zearn-import.ts # Zearn data import
└── analytics.ts # Analytics aggregations
Zod Schemas All SCM schemas are in src/lib/schema/zod-schema/scm/:
Student Schema (scm/student/student.ts) import { StudentZodSchema , type Student } from "@zod-schema/scm/student/student" ;
interface Student {
studentID : number ;
firstName : string ;
lastName : string ;
school : "IS313" | "PS19" | "X644" ;
section : string ;
gradeLevel ?: string ;
email : string ;
active : boolean ;
masteredSkills : string [];
skillPerformances : SkillPerformance [];
zearnLessons : ZearnLessonCompletion [];
podsieProgress : PodsieProgress [];
classActivities : StudentActivity [];
}
Section Config Schema (scm/podsie/section-config.ts) import { SectionConfigZodSchema , type SectionConfig } from "@zod-schema/scm/podsie/section-config" ;
interface SectionConfig {
school : string ;
classSection : string ;
teacher ?: string ;
gradeLevel : string ;
scopeSequenceTag ?: string ;
groupId ?: string ;
specialPopulations : string [];
bellSchedule ?: BellSchedule ;
assignmentContent : AssignmentContent [];
youtubeLinks : YoutubeLink [];
activeYoutubeUrl ?: string ;
}
Curriculum Schemas (scm/curriculum/)
import { RoadmapUnitZodSchema , type RoadmapUnit } from "@zod-schema/scm/roadmaps/roadmap-unit" ;
interface RoadmapUnit {
grade : string ;
unitTitle : string ;
unitNumber ?: number ;
targetSkills : string [];
additionalSupportSkills : string [];
extensionSkills : string [];
}
import { RoadmapSkillZodSchema , type RoadmapSkill } from "@zod-schema/scm/roadmaps/roadmap-skill" ;
import { ScopeAndSequenceZodSchema , type ScopeAndSequence } from "@zod-schema/scm/scope-and-sequence/scope-and-sequence" ;
Podsie Schemas (scm/podsie/)
import { PodsieCompletionZodSchema } from "@zod-schema/scm/podsie/podsie-completion" ;
import { LearningContentZodSchema } from "@zod-schema/scm/podsie/learning-content" ;
import { PodsieQuestionMapZodSchema } from "@zod-schema/scm/podsie/podsie-question-map" ;
Key Types
interface SectionOption {
id : string ;
school : string ;
classSection : string ;
teacher ?: string ;
gradeLevel ?: string ;
displayName : string ;
scopeSequenceTag ?: string ;
specialPopulations ?: string [];
}
interface SectionWeeklyData {
section : string ;
school : string ;
totalMasteryChecks : number ;
totalStudents : number ;
masteryChecksPerStudent : number ;
attendance : {
present : number ;
late : number ;
absent : number ;
total : number ;
};
}