Custom Blender Animation Export

I was success on export mesh data including vertices, normals and triangle indices.
However, I’m trying to export the animation data.
Here is the result for the skeleton exported:
https://nohaygang.web.app/test-skeleton.html
You can click the url and wait for about 10 seconds then the animating skeletons (cubed) will appear.

This is the export code for the poses:

obj = context.object

pose = obj.pose
bones = {}

def traverseBone(bone):
            bones[bone.name] = bones.get(bone.name) or []
            bones[bone.name].append(
                [a for row in bone.matrix.transposed() for a in row])
            for child in bone.children:
                traverseBone(child)

for frame in range(scene.frame_start, scene.frame_end + 1):
            scene.frame_set(frame)
            traverseBone(pose.bones[0])

Assume this is only 1 root bone of the armature.

The problem is, the original vertices value is in range [0, 1] while to bone matrix transform the vertices to a larger range [0, 7] or more. thus the final animating result is like this:
https://nohaygang.web.app/test-man.html

You can see the man mesh is scaled according to the bones.

This is the formula for skinning:

outV = sum(weights[i] / totalWeights * boneMatrix[i] * v)

I want to know what other information I can extract from blender to make the skin correctly?