# Sigaa Skill

> Authenticate to Brazilian SIGAA academic systems and retrieve student or professor portal information through controlled web scraping. Use for enrollment status, classes, grades, academic history, schedules, student lists, or SIGAA session troubleshooting.

- Skill: `olegantonov/sigaa-skill` (Agent Skill, multi-file: 3 files)
- Install (CLI): `npx skillmds@latest add olegantonov/sigaa-skill`
- Raw SKILL.md: https://api.skillmd.com/api/skills/olegantonov/sigaa-skill/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- License: MIT
- Author: olegantonov (https://skillmd.com/u/olegantonov)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/olegantonov/sigaa-skill

---


# SIGAA portal access

Use the bundled shell scripts for read-only access to SIGAA student and
professor portals. SIGAA is a JSF application without a uniform public API, so
HTML and navigation details can vary between institutions and versions.

Resolve every script and reference path relative to the directory containing
this file. Do not assume the current working directory is the skill directory.

## Operating rules

1. Access only the account and institution the user is authorized to use.
   Confirm that `SIGAA_URL` is the intended institutional domain before login.
2. Treat credentials, cookies, grades, enrollment records, schedules, and
   student lists as sensitive. Do not print credentials, persist raw pages, or
   disclose unrelated records.
3. The bundled commands are read-only. They do not submit grades, attendance,
   enrollment requests, or other academic changes. Never simulate a write by
   inventing an undocumented JSF action.
4. If a page layout differs from the references, inspect the fresh response and
   adapt conservatively. Do not repeatedly submit login forms or stale JSF
   `ViewState` values.
5. Use a one-off command when possible so the temporary cookie is cleaned up
   automatically. For a reused session, call `sigaa_logout` when finished.

## Configuration

Set credentials in the execution environment, never as command arguments:

```bash
export SIGAA_URL='https://sigaa.example.edu.br'
export SIGAA_USER='institution_login'
export SIGAA_PASSWORD='account_password'
```

Use the base URL without `/sigaa/...`. The login script removes a trailing
slash and rejects values that do not start with `http://` or `https://`.

## Recommended one-off workflow

Let `SKILL_DIR` be the absolute path of this skill directory. Student and
professor scripts automatically create a session when the three credential
variables are present, then delete the temporary cookie on exit.

```bash
bash "$SKILL_DIR/scripts/sigaa_student.sh" status
bash "$SKILL_DIR/scripts/sigaa_student.sh" enrollments
bash "$SKILL_DIR/scripts/sigaa_student.sh" enrollment-result
bash "$SKILL_DIR/scripts/sigaa_student.sh" grades
bash "$SKILL_DIR/scripts/sigaa_student.sh" history
bash "$SKILL_DIR/scripts/sigaa_student.sh" schedule

bash "$SKILL_DIR/scripts/sigaa_professor.sh" classes
bash "$SKILL_DIR/scripts/sigaa_professor.sh" students 123456
bash "$SKILL_DIR/scripts/sigaa_professor.sh" attendance
bash "$SKILL_DIR/scripts/sigaa_professor.sh" schedule
```

The scripts print normalized text or tab-separated table rows. Summarize only
the fields relevant to the request.

## Reusing a session

For several operations in one persistent Bash process:

```bash
source "$SKILL_DIR/scripts/sigaa_login.sh"
bash "$SKILL_DIR/scripts/sigaa_student.sh" status
bash "$SKILL_DIR/scripts/sigaa_student.sh" grades
sigaa_logout
```

Sourcing exports `SIGAA_COOKIE_FILE`, `SIGAA_USER_ID`, and `SIGAA_BASE_URL`, and
clears `SIGAA_PASSWORD` after authentication. It also defines `sigaa_logout`.
It does not replace the caller's shell options or existing EXIT trap.

## JSF navigation

Menu operations require a fresh `javax.faces.ViewState`, the user's numeric ID,
and an institution/version-specific `jscook_action`. The scripts fetch a fresh
portal page before each POST.

Do not reuse a `ViewState` after navigation. A response that redirects to login
usually means the session expired; authenticate once more, then retry the
read-only action. Do not automatically retry authentication failures.

## Reference routing

- Read [references/institutions.md](references/institutions.md) when choosing a
  base URL, login type, or institution-specific username format.
- Read [references/student-guide.md](references/student-guide.md) when a student
  portal action, graduate-program variation, or parsing issue is involved.
- Read [references/professor-guide.md](references/professor-guide.md) for
  professor portal navigation and terminology. The guide documents pages that
  the bundled read-only CLI may not expose.

## Troubleshooting

| Symptom | Response |
|---|---|
| Invalid credentials | Verify the institution's login identifier format; do not retry repeatedly. |
| Empty current classes | Check `enrollment-result`; a request may still be pending. |
| Portal page returned after a menu POST | Fetch a fresh page and `ViewState`; verify the documented action for that deployment. |
| Redirect to login | The cookie expired; create one new session. |
| User ID not found | The institution's portal markup differs; inspect the hidden fields before running menu actions. |

If the user requests an academic write operation, explain that these scripts do
not implement it. Continue only through an authorized, reviewable interface and
after the user explicitly approves the exact change.

